ibm-cloud-docs / schematics

schematics
Other
1 stars 10 forks source link

IBM Cloud Schematics Tutorial error - does it need to be updated? #14

Closed douglin closed 3 years ago

douglin commented 3 years ago

Link to Tutorial: https://cloud.ibm.com/docs/schematics?topic=schematics-provisioning-terraform-template

Here's the error I got while trying to use this tutorial. I got stuck on the Terraform apply step

Warning: Interpolation-only expressions are deprecated 2021/03/08 15:30:54 Terraform apply | 2021/03/08 15:30:54 Terraform apply | on main.tf line 48, in resource "ibm_kms_key" "test": 2021/03/08 15:30:54 Terraform apply | 48: instance_id = "${ibm_resource_instance.kms_instance1.guid}" 2021/03/08 15:30:54 Terraform apply | 2021/03/08 15:30:54 Terraform apply | Terraform 0.11 and earlier required all non-constant expressions to be 2021/03/08 15:30:54 Terraform apply | provided via interpolation syntax, but this pattern is now deprecated. To 2021/03/08 15:30:54 Terraform apply | silence this warning, remove the "${ sequence from the start and the }" 2021/03/08 15:30:54 Terraform apply | sequence from the end of this expression, leaving just the inner expression. 2021/03/08 15:30:54 Terraform apply | 2021/03/08 15:30:54 Terraform apply | Template interpolation syntax is still used to construct strings from 2021/03/08 15:30:54 Terraform apply | expressions when the template includes multiple interpolation sequences or a 2021/03/08 15:30:54 Terraform apply | mixture of literal strings and interpolations. This deprecation applies only 2021/03/08 15:30:54 Terraform apply | to templates that consist entirely of a single interpolation sequence. 2021/03/08 15:30:54 Terraform apply | 2021/03/08 15:30:54 Terraform apply | 2021/03/08 15:30:54 Terraform apply | Error: Error while creating Subnet Invalid json payload provided 2021/03/08 15:30:54 Terraform apply | { 2021/03/08 15:30:54 Terraform apply | "StatusCode": 400, 2021/03/08 15:30:54 Terraform apply | "Headers": { 2021/03/08 15:30:54 Terraform apply | "Cache-Control": [ 2021/03/08 15:30:54 Terraform apply | "max-age=0, no-cache, no-store, must-revalidate" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Cf-Cache-Status": [ 2021/03/08 15:30:54 Terraform apply | "DYNAMIC" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Cf-Ray": [ 2021/03/08 15:30:54 Terraform apply | "62cd1b7eaba900c1-IAD" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Cf-Request-Id": [ 2021/03/08 15:30:54 Terraform apply | "08b40f8329000000c17a805000000001" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Connection": [ 2021/03/08 15:30:54 Terraform apply | "keep-alive" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Content-Length": [ 2021/03/08 15:30:54 Terraform apply | "323" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Content-Type": [ 2021/03/08 15:30:54 Terraform apply | "application/json; charset=utf-8" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Date": [ 2021/03/08 15:30:54 Terraform apply | "Mon, 08 Mar 2021 15:30:54 GMT" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Expect-Ct": [ 2021/03/08 15:30:54 Terraform apply | "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Expires": [ 2021/03/08 15:30:54 Terraform apply | "-1" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Pragma": [ 2021/03/08 15:30:54 Terraform apply | "no-cache" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Server": [ 2021/03/08 15:30:54 Terraform apply | "cloudflare" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Set-Cookie": [ 2021/03/08 15:30:54 Terraform apply | "cfduid=ddf54d853c1a88470f213f761355e086c1615217453; expires=Wed, 07-Apr-21 15:30:53 GMT; path=/; domain=.iaas.cloud.ibm.com; HttpOnly; SameSite=Lax; Secure" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Strict-Transport-Security": [ 2021/03/08 15:30:54 Terraform apply | "max-age=31536000; includeSubDomains" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Vary": [ 2021/03/08 15:30:54 Terraform apply | "Accept-Encoding" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "X-Content-Type-Options": [ 2021/03/08 15:30:54 Terraform apply | "nosniff" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "X-Request-Id": [ 2021/03/08 15:30:54 Terraform apply | "29cfca58-93ac-43bc-9d1b-dbb8f7c189be" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "X-Trace-Id": [ 2021/03/08 15:30:54 Terraform apply | "6c34324bb1a88e6" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "X-Xss-Protection": [ 2021/03/08 15:30:54 Terraform apply | "1; mode=block" 2021/03/08 15:30:54 Terraform apply | ] 2021/03/08 15:30:54 Terraform apply | }, 2021/03/08 15:30:54 Terraform apply | "Result": { 2021/03/08 15:30:54 Terraform apply | "errors": [ 2021/03/08 15:30:54 Terraform apply | { 2021/03/08 15:30:54 Terraform apply | "code": "bad_field", 2021/03/08 15:30:54 Terraform apply | "message": "Invalid json payload provided", 2021/03/08 15:30:54 Terraform apply | "more_info": "Key: 'SubnetTemplateOneOf.SubnetTemplateCommon.Zone.ZoneIdentityByName.Name' Error:Field validation for 'Name' failed on the 'riaasName' tag", 2021/03/08 15:30:54 Terraform apply | "target": { 2021/03/08 15:30:54 Terraform apply | "name": "zone.name", 2021/03/08 15:30:54 Terraform apply | "type": "field" 2021/03/08 15:30:54 Terraform apply | } 2021/03/08 15:30:54 Terraform apply | } 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "trace": "29cfca58-93ac-43bc-9d1b-dbb8f7c189be" 2021/03/08 15:30:54 Terraform apply | }, 2021/03/08 15:30:54 Terraform apply | "RawResult": null 2021/03/08 15:30:54 Terraform apply | } 2021/03/08 15:30:54 Terraform apply | 2021/03/08 15:30:54 Terraform apply | 2021/03/08 15:30:54 Terraform apply | on main.tf line 22, in resource "ibm_is_subnet" "subnet1": 2021/03/08 15:30:54 Terraform apply | 22: resource "ibm_is_subnet" "subnet1" { 2021/03/08 15:30:54 Terraform apply | 2021/03/08 15:30:54 Terraform apply | 2021/03/08 15:30:54 Terraform apply | 2021/03/08 15:30:54 Terraform apply | Error: Error while creating Subnet Invalid json payload provided 2021/03/08 15:30:54 Terraform apply | { 2021/03/08 15:30:54 Terraform apply | "StatusCode": 400, 2021/03/08 15:30:54 Terraform apply | "Headers": { 2021/03/08 15:30:54 Terraform apply | "Cache-Control": [ 2021/03/08 15:30:54 Terraform apply | "max-age=0, no-cache, no-store, must-revalidate" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Cf-Cache-Status": [ 2021/03/08 15:30:54 Terraform apply | "DYNAMIC" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Cf-Ray": [ 2021/03/08 15:30:54 Terraform apply | "62cd1b7eaa2d749f-IAD" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Cf-Request-Id": [ 2021/03/08 15:30:54 Terraform apply | "08b40f832d0000749f840aa000000001" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Connection": [ 2021/03/08 15:30:54 Terraform apply | "keep-alive" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Content-Length": [ 2021/03/08 15:30:54 Terraform apply | "323" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Content-Type": [ 2021/03/08 15:30:54 Terraform apply | "application/json; charset=utf-8" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Date": [ 2021/03/08 15:30:54 Terraform apply | "Mon, 08 Mar 2021 15:30:54 GMT" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Expect-Ct": [ 2021/03/08 15:30:54 Terraform apply | "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\"" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Expires": [ 2021/03/08 15:30:54 Terraform apply | "-1" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Pragma": [ 2021/03/08 15:30:54 Terraform apply | "no-cache" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Server": [ 2021/03/08 15:30:54 Terraform apply | "cloudflare" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Set-Cookie": [ 2021/03/08 15:30:54 Terraform apply | "cfduid=d3fd8e34deaa01ba8f8025dd4ce6a855c1615217453; expires=Wed, 07-Apr-21 15:30:53 GMT; path=/; domain=.iaas.cloud.ibm.com; HttpOnly; SameSite=Lax; Secure" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Strict-Transport-Security": [ 2021/03/08 15:30:54 Terraform apply | "max-age=31536000; includeSubDomains" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "Vary": [ 2021/03/08 15:30:54 Terraform apply | "Accept-Encoding" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "X-Content-Type-Options": [ 2021/03/08 15:30:54 Terraform apply | "nosniff" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "X-Request-Id": [ 2021/03/08 15:30:54 Terraform apply | "c8f6ef20-db90-47b8-bffb-36f2be02d16f" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "X-Trace-Id": [ 2021/03/08 15:30:54 Terraform apply | "7f27e741f7a0cf58" 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "X-Xss-Protection": [ 2021/03/08 15:30:54 Terraform apply | "1; mode=block" 2021/03/08 15:30:54 Terraform apply | ] 2021/03/08 15:30:54 Terraform apply | }, 2021/03/08 15:30:54 Terraform apply | "Result": { 2021/03/08 15:30:54 Terraform apply | "errors": [ 2021/03/08 15:30:54 Terraform apply | { 2021/03/08 15:30:54 Terraform apply | "code": "bad_field", 2021/03/08 15:30:54 Terraform apply | "message": "Invalid json payload provided", 2021/03/08 15:30:54 Terraform apply | "more_info": "Key: 'SubnetTemplateOneOf.SubnetTemplateCommon.Zone.ZoneIdentityByName.Name' Error:Field validation for 'Name' failed on the 'riaasName' tag", 2021/03/08 15:30:54 Terraform apply | "target": { 2021/03/08 15:30:54 Terraform apply | "name": "zone.name", 2021/03/08 15:30:54 Terraform apply | "type": "field" 2021/03/08 15:30:54 Terraform apply | } 2021/03/08 15:30:54 Terraform apply | } 2021/03/08 15:30:54 Terraform apply | ], 2021/03/08 15:30:54 Terraform apply | "trace": "c8f6ef20-db90-47b8-bffb-36f2be02d16f" 2021/03/08 15:30:54 Terraform apply | }, 2021/03/08 15:30:54 Terraform apply | "RawResult": null 2021/03/08 15:30:54 Terraform apply | } 2021/03/08 15:30:54 Terraform apply | 2021/03/08 15:30:54 Terraform apply | 2021/03/08 15:30:54 Terraform apply | on main.tf line 29, in resource "ibm_is_subnet" "subnet2": 2021/03/08 15:30:54 Terraform apply | 29: resource "ibm_is_subnet" "subnet2" { 2021/03/08 15:30:54 Terraform apply | 2021/03/08 15:30:54 Terraform apply | 2021/03/08 15:30:54 Terraform APPLY error: Terraform APPLY errorexit status 1 2021/03/08 15:30:54 Could not execute action

geethasathyamurthy commented 3 years ago

@douglin, Thanks for letting us know the issue. I see you are using Terraform v0.11. For the validation error in the subnet name provided for subnet1 and subnet2. Could you please check the subnet name that is defined, the name should not have special character or capitalised letter. If the error persist, please do share your template, we can cross check and revert.

Hope this helps!

Regards, Geetha

Nadine2016 commented 3 years ago

closing this issue. @douglin please feel free to reopen if you still see an issue with the tutorial.

gasgithub commented 3 years ago

I have exactly same error in the tutorial. Please provide some hints what might be wrong...

 2021/08/04 12:38:14 Terraform apply | ibm_resource_instance.cos_instance: Creation complete after 19s [id=crn:v1:bluemix:public:cloud-object-storage:global:a/b71ac2564ef0b98f1032d189795994dc:5020eadc-e0a7-457c-982c-191416c16a38::]
 2021/08/04 12:38:15 Terraform apply | ibm_is_vpc.vpc1: Creation complete after 19s [id=r006-1e800801-9411-4dda-80d0-acf5ce033b2c]
 2021/08/04 12:38:15 Terraform apply | ibm_is_subnet.subnet1: Creating...
 2021/08/04 12:38:15 Terraform apply | ibm_is_subnet.subnet2: Creating...
 2021/08/04 12:38:15 Terraform apply | ibm_kms_key.test: Creation complete after 2s [id=crn:v1:bluemix:public:kms:us-south:a/b71ac2564ef0b98f1032d189795994dc:420f5a24-dc7a-4b60-9e20-e15853dd6a26:key:7f58bb73-a530-4efd-841e-47a82c20e2b0]
 2021/08/04 12:38:15 Terraform apply |
 2021/08/04 12:38:15 Terraform apply | Warning: Interpolation-only expressions are deprecated
 2021/08/04 12:38:15 Terraform apply |
 2021/08/04 12:38:15 Terraform apply |   on main.tf line 44, in resource "ibm_kms_key" "test":
 2021/08/04 12:38:15 Terraform apply |   44:     instance_id = "${ibm_resource_instance.kms_instance1.guid}"
 2021/08/04 12:38:15 Terraform apply |
 2021/08/04 12:38:15 Terraform apply | Terraform 0.11 and earlier required all non-constant expressions to be
 2021/08/04 12:38:15 Terraform apply | provided via interpolation syntax, but this pattern is now deprecated. To
 2021/08/04 12:38:15 Terraform apply | silence this warning, remove the "${ sequence from the start and the }"
 2021/08/04 12:38:15 Terraform apply | sequence from the end of this expression, leaving just the inner expression.
 2021/08/04 12:38:15 Terraform apply |
 2021/08/04 12:38:15 Terraform apply | Template interpolation syntax is still used to construct strings from
 2021/08/04 12:38:15 Terraform apply | expressions when the template includes multiple interpolation sequences or a
 2021/08/04 12:38:15 Terraform apply | mixture of literal strings and interpolations. This deprecation applies only
 2021/08/04 12:38:15 Terraform apply | to templates that consist entirely of a single interpolation sequence.
 2021/08/04 12:38:15 Terraform apply |
 2021/08/04 12:38:15 Terraform apply |
 2021/08/04 12:38:15 Terraform apply | Error: Error while creating Subnet Invalid json payload provided: Key: 'SubnetTemplateOneOf.SubnetTemplateCommon.Zone.ZoneIdentityByName.Name' Error:Field validation for 'Name' failed on the 'riaasName' tag
 2021/08/04 12:38:15 Terraform apply | {
 2021/08/04 12:38:15 Terraform apply |     "StatusCode": 400,
 2021/08/04 12:38:15 Terraform apply |     "Headers": {
 2021/08/04 12:38:15 Terraform apply |         "Cache-Control": [
 2021/08/04 12:38:15 Terraform apply |             "max-age=0, no-cache, no-store, must-revalidate"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Cf-Cache-Status": [
 2021/08/04 12:38:15 Terraform apply |             "DYNAMIC"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Cf-Ray": [
 2021/08/04 12:38:15 Terraform apply |             "6797d7783d01d729-FRA"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Content-Length": [
 2021/08/04 12:38:15 Terraform apply |             "309"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Content-Type": [
 2021/08/04 12:38:15 Terraform apply |             "application/json; charset=utf-8"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Date": [
 2021/08/04 12:38:15 Terraform apply |             "Wed, 04 Aug 2021 12:38:15 GMT"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Expect-Ct": [
 2021/08/04 12:38:15 Terraform apply |             "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\""
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Expires": [
 2021/08/04 12:38:15 Terraform apply |             "-1"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Pragma": [
 2021/08/04 12:38:15 Terraform apply |             "no-cache"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Server": [
 2021/08/04 12:38:15 Terraform apply |             "cloudflare"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Strict-Transport-Security": [
 2021/08/04 12:38:15 Terraform apply |             "max-age=31536000; includeSubDomains"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Vary": [
 2021/08/04 12:38:15 Terraform apply |             "Accept-Encoding"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "X-Content-Type-Options": [
 2021/08/04 12:38:15 Terraform apply |             "nosniff"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "X-Request-Id": [
 2021/08/04 12:38:15 Terraform apply |             "1c337d0b-036b-4b2c-a39d-27dfeecd1140"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "X-Xss-Protection": [
 2021/08/04 12:38:15 Terraform apply |             "1; mode=block"
 2021/08/04 12:38:15 Terraform apply |         ]
 2021/08/04 12:38:15 Terraform apply |     },
 2021/08/04 12:38:15 Terraform apply |     "Result": {
 2021/08/04 12:38:15 Terraform apply |         "errors": [
 2021/08/04 12:38:15 Terraform apply |             {
 2021/08/04 12:38:15 Terraform apply |                 "code": "bad_field",
 2021/08/04 12:38:15 Terraform apply |                 "message": "Invalid json payload provided: Key: 'SubnetTemplateOneOf.SubnetTemplateCommon.Zone.ZoneIdentityByName.Name' Error:Field validation for 'Name' failed on the 'riaasName' tag",
 2021/08/04 12:38:15 Terraform apply |                 "target": {
 2021/08/04 12:38:15 Terraform apply |                     "name": "zone.name",
 2021/08/04 12:38:15 Terraform apply |                     "type": "field"
 2021/08/04 12:38:15 Terraform apply |                 }
 2021/08/04 12:38:15 Terraform apply |             }
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "trace": "1c337d0b-036b-4b2c-a39d-27dfeecd1140"
 2021/08/04 12:38:15 Terraform apply |     },
 2021/08/04 12:38:15 Terraform apply |     "RawResult": null
 2021/08/04 12:38:15 Terraform apply | }
 2021/08/04 12:38:15 Terraform apply |
 2021/08/04 12:38:15 Terraform apply |
 2021/08/04 12:38:15 Terraform apply |   on main.tf line 18, in resource "ibm_is_subnet" "subnet1":
 2021/08/04 12:38:15 Terraform apply |   18: resource "ibm_is_subnet" "subnet1" {
 2021/08/04 12:38:15 Terraform apply |
 2021/08/04 12:38:15 Terraform apply |
 2021/08/04 12:38:15 Terraform apply |
 2021/08/04 12:38:15 Terraform apply | Error: Error while creating Subnet Invalid json payload provided: Key: 'SubnetTemplateOneOf.SubnetTemplateCommon.Zone.ZoneIdentityByName.Name' Error:Field validation for 'Name' failed on the 'riaasName' tag
 2021/08/04 12:38:15 Terraform apply | {
 2021/08/04 12:38:15 Terraform apply |     "StatusCode": 400,
 2021/08/04 12:38:15 Terraform apply |     "Headers": {
 2021/08/04 12:38:15 Terraform apply |         "Cache-Control": [
 2021/08/04 12:38:15 Terraform apply |             "max-age=0, no-cache, no-store, must-revalidate"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Cf-Cache-Status": [
 2021/08/04 12:38:15 Terraform apply |             "DYNAMIC"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Cf-Ray": [
 2021/08/04 12:38:15 Terraform apply |             "6797d7783d08d729-FRA"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Content-Length": [
 2021/08/04 12:38:15 Terraform apply |             "309"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Content-Type": [
 2021/08/04 12:38:15 Terraform apply |             "application/json; charset=utf-8"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Date": [
 2021/08/04 12:38:15 Terraform apply |             "Wed, 04 Aug 2021 12:38:15 GMT"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Expect-Ct": [
 2021/08/04 12:38:15 Terraform apply |             "max-age=604800, report-uri=\"https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct\""
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Expires": [
 2021/08/04 12:38:15 Terraform apply |             "-1"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Pragma": [
 2021/08/04 12:38:15 Terraform apply |             "no-cache"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Server": [
 2021/08/04 12:38:15 Terraform apply |             "cloudflare"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Strict-Transport-Security": [
 2021/08/04 12:38:15 Terraform apply |             "max-age=31536000; includeSubDomains"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "Vary": [
 2021/08/04 12:38:15 Terraform apply |             "Accept-Encoding"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "X-Content-Type-Options": [
 2021/08/04 12:38:15 Terraform apply |             "nosniff"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "X-Request-Id": [
 2021/08/04 12:38:15 Terraform apply |             "675c7c05-7317-4c71-bfa7-e35988dae347"
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "X-Xss-Protection": [
 2021/08/04 12:38:15 Terraform apply |             "1; mode=block"
 2021/08/04 12:38:15 Terraform apply |         ]
 2021/08/04 12:38:15 Terraform apply |     },
 2021/08/04 12:38:15 Terraform apply |     "Result": {
 2021/08/04 12:38:15 Terraform apply |         "errors": [
 2021/08/04 12:38:15 Terraform apply |             {
 2021/08/04 12:38:15 Terraform apply |                 "code": "bad_field",
 2021/08/04 12:38:15 Terraform apply |                 "message": "Invalid json payload provided: Key: 'SubnetTemplateOneOf.SubnetTemplateCommon.Zone.ZoneIdentityByName.Name' Error:Field validation for 'Name' failed on the 'riaasName' tag",
 2021/08/04 12:38:15 Terraform apply |                 "target": {
 2021/08/04 12:38:15 Terraform apply |                     "name": "zone.name",
 2021/08/04 12:38:15 Terraform apply |                     "type": "field"
 2021/08/04 12:38:15 Terraform apply |                 }
 2021/08/04 12:38:15 Terraform apply |             }
 2021/08/04 12:38:15 Terraform apply |         ],
 2021/08/04 12:38:15 Terraform apply |         "trace": "675c7c05-7317-4c71-bfa7-e35988dae347"
 2021/08/04 12:38:15 Terraform apply |     },
 2021/08/04 12:38:15 Terraform apply |     "RawResult": null
 2021/08/04 12:38:15 Terraform apply | }
 2021/08/04 12:38:15 Terraform apply |
 2021/08/04 12:38:15 Terraform apply |
 2021/08/04 12:38:15 Terraform apply |   on main.tf line 25, in resource "ibm_is_subnet" "subnet2":
 2021/08/04 12:38:15 Terraform apply |   25: resource "ibm_is_subnet" "subnet2" {
 2021/08/04 12:38:15 Terraform apply |
 2021/08/04 12:38:15 Terraform apply |
 2021/08/04 12:38:16 ←[1m←[31mTerraform APPLY error: Terraform APPLY errorexit status 1←[39m←[0m
 2021/08/04 12:38:16 ←[1m←[31mCould not execute action←[39m←[0m
gasgithub commented 3 years ago

Errors in the tutorial and solutions:

1) "Invalid json payload provided: Key: 'SubnetTemplateOneOf.SubnetTemplateCommon.Zone.ZoneIdentityByName.Name'" Incorrect region name provided in the cluster_payload.json IS:

{
          "name": "region",
          "value": "North America",
          "type": "string"
},

SHOULD BE:

{
          "name": "region",
          "value": "us-south",
          "type": "string"
},

2) Error creating IKS cluster - "E0156","description":"A previous patch was specified. Only the most recent patch for a particular minor version can be specified during cluster create." Outdated kube version in the variables.tf file. IS:

variable "kube_version" {
  default = "1.17.7"
}

SHOLUD BE: Should be mentioned to check available values using: ibmcloud ks versions command and update kube_version variable.

3) Non existing flavor : "E4e5b","description":"Could not find flavor in the requested zone." in cluster_payload.json IS: "value": "c2.2x4" SHOULD BE: "value": "cx2.2x4" or default bx2.2x8

4) Cluster is not created successfully - it times out

2021/08/04 15:50:16 Terraform apply | Error: timeout while waiting for state to become 'Ready' (last state: 'Deploy in progress', timeout: 1h30m0s)
 2021/08/04 15:50:16 Terraform apply | 
 2021/08/04 15:50:16 Terraform apply |   on main.tf line 50, in resource "ibm_container_vpc_cluster" "cluster":
 2021/08/04 15:50:16 Terraform apply |   50: resource "ibm_container_vpc_cluster" "cluster" {
 2021/08/04 15:50:16 Terraform apply | 
 2021/08/04 15:50:16 Terraform apply | 

It is due to some errors in network setup. When you enter your IKS cluster, in nodes it reports Critical node state with message: "Deploy failed - Worker deploy failed due to network communications failing to master or registry endpoints. Please verify your network setup is allowing traffic from this subnet then attempt a worker replace on this worker"