Closed kapild-devops closed 1 year ago
Can you send us complete log we tried something similar template but we are not able to reproduce it
data "ibm_is_zones" "ds_zones" {
region="us-south"
}
data "ibm_is_vpc" "ds_vpc" {
name = "test"
}
2021/02/23 15:18:22 [DEBUG] ReferenceTransformer: "data.ibm_is_zones.ds_zones (expand)" references: []
2021/02/23 15:18:22 [DEBUG] Starting graph walk: walkPlan
2021-02-23T15:18:22.190+0530 [INFO] plugin: configuring client automatic mTLS
2021-02-23T15:18:22.211+0530 [DEBUG] plugin: starting plugin: path=.terraform/plugins/registry.terraform.io/ibm-cloud/ibm/1.16.1/darwin_amd64/terraform-provider-ibm_v1.16.1 args=[.terraform/plugins/registry.terraform.io/ibm-cloud/ibm/1.16.1/darwin_amd64/terraform-provider-ibm_v1.16.1]
2021-02-23T15:18:22.219+0530 [DEBUG] plugin: plugin started: path=.terraform/plugins/registry.terraform.io/ibm-cloud/ibm/1.16.1/darwin_amd64/terraform-provider-ibm_v1.16.1 pid=55043
2021-02-23T15:18:22.219+0530 [DEBUG] plugin: waiting for RPC address: path=.terraform/plugins/registry.terraform.io/ibm-cloud/ibm/1.16.1/darwin_amd64/terraform-provider-ibm_v1.16.1
2021-02-23T15:18:22.278+0530 [DEBUG] plugin.terraform-provider-ibm_v1.16.1: 2021/02/23 15:18:22 IBM Cloud Provider version 1.16.1
2021-02-23T15:18:22.283+0530 [INFO] plugin.terraform-provider-ibm_v1.16.1: configuring server automatic mTLS: timestamp=2021-02-23T15:18:22.282+0530
2021-02-23T15:18:22.308+0530 [DEBUG] plugin.terraform-provider-ibm_v1.16.1: plugin address: address=/var/folders/mk/76ksfld97q72r64b7q4v28_r0000gn/T/plugin949964790 network=unix timestamp=2021-02-23T15:18:22.307+0530
2021-02-23T15:18:22.308+0530 [DEBUG] plugin: using plugin: version=5
2021-02-23T15:18:22.394+0530 [DEBUG] plugin.terraform-provider-ibm_v1.16.1: 2021/02/23 15:18:22 Configuring IBM Cloud Session with API key
2021-02-23T15:18:22.394+0530 [DEBUG] plugin.terraform-provider-ibm_v1.16.1: 2021/02/23 15:18:22 [INFO] Configured Region: us-south
2021-02-23T15:18:27.920+0530 [DEBUG] plugin.terraform-provider-ibm_v1.16.1: 2021/02/23 15:18:27 the apiendpoint url for power is us-south.power-iaas.cloud.ibm.com
2021/02/23 15:18:27 [DEBUG] ReferenceTransformer: "data.ibm_is_vpc.ds_vpc" references: []
2021/02/23 15:18:27 [DEBUG] ReferenceTransformer: "data.ibm_is_zones.ds_zones" references: []
2021/02/23 15:18:27 [WARN] ReferenceTransformer: reference not found: "count.index"
2021/02/23 15:18:27 [DEBUG] ReferenceTransformer: "data.ibm_is_subnet.backend_subnet[0]" references: []
2021/02/23 15:18:27 [WARN] ReferenceTransformer: reference not found: "count.index"
2021/02/23 15:18:27 [DEBUG] ReferenceTransformer: "data.ibm_is_subnet.backend_subnet[1]" references: []
2021/02/23 15:18:27 [WARN] ReferenceTransformer: reference not found: "count.index"
2021/02/23 15:18:27 [WARN] ReferenceTransformer: reference not found: "count.index"
2021/02/23 15:18:27 [DEBUG] ReferenceTransformer: "ibm_is_volume.volume[0]" references: []
2021/02/23 15:18:27 [WARN] ReferenceTransformer: reference not found: "count.index"
2021/02/23 15:18:27 [WARN] ReferenceTransformer: reference not found: "count.index"
2021/02/23 15:18:27 [DEBUG] ReferenceTransformer: "ibm_is_volume.volume[1]" references: []
2021/02/23 15:18:27 [WARN] ReferenceTransformer: reference not found: "count.index"
2021/02/23 15:18:27 [WARN] ReferenceTransformer: reference not found: "count.index"
2021/02/23 15:18:27 [WARN] ReferenceTransformer: reference not found: "ibm_is_volume.volume"
2021/02/23 15:18:27 [WARN] ReferenceTransformer: reference not found: "count.index"
2021/02/23 15:18:27 [WARN] ReferenceTransformer: reference not found: "data.ibm_is_subnet.backend_subnet"
2021/02/23 15:18:27 [WARN] ReferenceTransformer: reference not found: "count.index"
2021/02/23 15:18:27 [DEBUG] ReferenceTransformer: "ibm_is_instance.vm[0]" references: []
2021/02/23 15:18:27 [WARN] ReferenceTransformer: reference not found: "count.index"
2021/02/23 15:18:27 [WARN] ReferenceTransformer: reference not found: "ibm_is_volume.volume"
2021/02/23 15:18:27 [WARN] ReferenceTransformer: reference not found: "count.index"
2021/02/23 15:18:27 [WARN] ReferenceTransformer: reference not found: "count.index"
2021/02/23 15:18:27 [WARN] ReferenceTransformer: reference not found: "data.ibm_is_subnet.backend_subnet"
2021/02/23 15:18:27 [WARN] ReferenceTransformer: reference not found: "count.index"
2021/02/23 15:18:27 [DEBUG] ReferenceTransformer: "ibm_is_instance.vm[1]" references: []
2021/02/23 15:18:27 [WARN] Provider "registry.terraform.io/ibm-cloud/ibm" produced an invalid plan for ibm_is_instance.vm[0], but we are tolerating it because it is using the legacy plugin SDK.
The following problems may be the cause of any confusing errors from downstream operations:
No changes. Infrastructure is up-to-date.
data "ibm_is_subnet" "backend_subnet" {
name = "test${count.index}"
count = 2
}
resource "ibm_is_instance" "vm" {
name = "test-${count.index + 1}"
vpc = data.ibm_is_vpc.ds_vpc.id
zone = element(data.ibm_is_zones.ds_zones.zones, count.index)
keys = ["YYYYYYYY"]
image = "XXXXXXXXX"
profile = "bx2-2x8"
count = 2
primary_network_interface {
subnet = data.ibm_is_subnet.backend_subnet[count.index].id
security_groups = [data.ibm_is_vpc.ds_vpc.default_security_group]
}
volumes = [
ibm_is_volume.volume[count.index].id,
]
}
resource "ibm_is_volume" "volume" {
count = 2
name = "storage-${count.index + 1}"
profile = "custom"
zone = element(data.ibm_is_zones.ds_zones.zones, count.index)
iops = 100
capacity = 100
}
PFA Complete logs:
2021/02/24 22:45:32 [INFO] backend/local: starting Plan operation 2021-02-24T22:45:32.143+0530 [INFO] plugin: configuring client automatic mTLS 2021-02-24T22:45:32.178+0530 [INFO] plugin.terraform-provider-random_v3.1.0_x5: configuring server automatic mTLS: timestamp=2021-02-24T22:45:32.177+0530 2021-02-24T22:45:32.268+0530 [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing" 2021-02-24T22:45:32.269+0530 [INFO] plugin: configuring client automatic mTLS 2021-02-24T22:45:32.302+0530 [INFO] plugin.terraform-provider-template_v2.2.0_x4: configuring server automatic mTLS: timestamp=2021-02-24T22:45:32.302+0530 2021-02-24T22:45:32.385+0530 [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unimplemented desc = unknown service plugin.GRPCStdio" 2021-02-24T22:45:32.386+0530 [INFO] plugin: configuring client automatic mTLS 2021-02-24T22:45:32.457+0530 [INFO] plugin.terraform-provider-ibm_v1.16.1: configuring server automatic mTLS: timestamp=2021-02-24T22:45:32.457+0530 2021-02-24T22:45:32.564+0530 [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing" 2021/02/24 22:45:32 [INFO] terraform: building graph: GraphTypeValidate 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "path.module" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:32 [WARN] ReferenceTransformer: reference not found: "count.index" 2021-02-24T22:45:32.582+0530 [INFO] plugin: configuring client automatic mTLS 2021-02-24T22:45:32.617+0530 [INFO] plugin.terraform-provider-random_v3.1.0_x5: configuring server automatic mTLS: timestamp=2021-02-24T22:45:32.616+0530 2021-02-24T22:45:32.700+0530 [INFO] plugin: configuring client automatic mTLS 2021-02-24T22:45:32.732+0530 [INFO] plugin.terraform-provider-template_v2.2.0_x4: configuring server automatic mTLS: timestamp=2021-02-24T22:45:32.732+0530 2021-02-24T22:45:32.814+0530 [INFO] plugin: configuring client automatic mTLS 2021-02-24T22:45:32.814+0530 [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unimplemented desc = unknown service plugin.GRPCStdio" 2021-02-24T22:45:32.890+0530 [INFO] plugin.terraform-provider-ibm_v1.16.1: configuring server automatic mTLS: timestamp=2021-02-24T22:45:32.890+0530 2021-02-24T22:45:33.027+0530 [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing" 2021-02-24T22:45:33.034+0530 [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing" 2021/02/24 22:45:33 [INFO] backend/local: plan calling Refresh 2021/02/24 22:45:33 [INFO] terraform: building graph: GraphTypeRefresh Refreshing Terraform state in-memory prior to plan... The refreshed state will be used to calculate this plan, but will not be persisted to local or remote state storage.
2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:45:33 [WARN] ReferenceTransformer: reference not found: "path.module" 2021-02-24T22:45:33.058+0530 [INFO] plugin: configuring client automatic mTLS 2021-02-24T22:45:33.091+0530 [INFO] plugin.terraform-provider-template_v2.2.0_x4: configuring server automatic mTLS: timestamp=2021-02-24T22:45:33.090+0530 2021-02-24T22:45:33.170+0530 [INFO] plugin: configuring client automatic mTLS 2021-02-24T22:45:33.171+0530 [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unimplemented desc = unknown service plugin.GRPCStdio" 2021-02-24T22:45:33.204+0530 [INFO] plugin.terraform-provider-random_v3.1.0_x5: configuring server automatic mTLS: timestamp=2021-02-24T22:45:33.203+0530 2021-02-24T22:45:33.288+0530 [INFO] plugin: configuring client automatic mTLS 2021-02-24T22:45:33.357+0530 [INFO] plugin.terraform-provider-ibm_v1.16.1: configuring server automatic mTLS: timestamp=2021-02-24T22:45:33.356+0530 2021/02/24 22:45:39 [WARN] ReferenceTransformer: reference not found: "var.ibm_region" module.bx-vpc.data.ibm_is_zones.ds_zones: Refreshing state... [id=2021-02-24 17:04:08.061457 +0000 UTC] module.bx-vpc.ibm_resource_group.rg: Refreshing state... [id=6738b23ab80c48bb9dec551aa2b6a550] module.bx-vpc.ibm_is_vpc.vpc: Refreshing state... [id=r006-ec7d34c8-b11e-4ec0-8037-78a49a70fb97] module.bx-vpc.ibm_is_public_gateway.pub_gw[2]: Refreshing state... [id=r006-938e07a4-8f42-436a-b205-48e7df022149] module.bx-vpc.ibm_is_public_gateway.pub_gw[0]: Refreshing state... [id=r006-6ad263f3-4f44-4fb2-bd22-a53f8e255c77] module.bx-vpc.ibm_is_security_group_rule.sg_rule_80_out: Refreshing state... [id=r006-28f9c9fc-f60f-4989-8ad4-7b2ae73e2d75.r006-99be2318-e0d4-4dc6-80f6-74dda4d2b3b6] module.bx-vpc.ibm_is_vpc_address_prefix.address_prefix[2]: Refreshing state... [id=r006-ec7d34c8-b11e-4ec0-8037-78a49a70fb97/r006-597aeca1-5a41-4cec-9293-8775ab0b5351] module.bx-vpc.ibm_is_security_group_rule.sg_rule_ssh: Refreshing state... [id=r006-28f9c9fc-f60f-4989-8ad4-7b2ae73e2d75.r006-0246fdfc-83a7-4b15-8de2-eb24a78bfdc4] module.bx-vpc.ibm_is_vpc_address_prefix.address_prefix[0]: Refreshing state... [id=r006-ec7d34c8-b11e-4ec0-8037-78a49a70fb97/r006-334443dd-e12d-4534-925d-cceb0c2d2b0d] module.bx-vpc.ibm_is_vpc_address_prefix.address_prefix[1]: Refreshing state... [id=r006-ec7d34c8-b11e-4ec0-8037-78a49a70fb97/r006-e3bb1e1e-50cd-43c3-96b9-7250d66a9ddb] module.bx-vpc.ibm_is_public_gateway.pub_gw[1]: Refreshing state... [id=r006-138f31ca-cba7-4794-bf35-ed0e86cdfd89] module.bx-vpc.ibm_is_subnet.test_subnet[0]: Refreshing state... [id=0717-4a0342b3-2eb5-43c8-a5c2-b0bd619b1c73] module.bx-vpc.ibm_is_subnet.test_subnet[2]: Refreshing state... [id=0737-bb30414f-fe7a-4589-9f5f-a1e51cb3935a] module.bx-vpc.ibm_is_subnet.test_subnet[1]: Refreshing state... [id=0727-95ba021a-d0d6-4426-bd70-da4b0a274abc] module.bx-vpc.ibm_is_network_acl.vpnacl_frontend: Refreshing state... [id=r006-8a7d17d9-8fd6-4cdc-8676-cd5090b04b1a] module.bx-vpc.ibm_is_subnet_network_acl_attachment.attach_frontend[1]: Refreshing state... [id=0727-95ba021a-d0d6-4426-bd70-da4b0a274abc] module.bx-vpc.ibm_is_subnet_network_acl_attachment.attach_frontend[0]: Refreshing state... [id=0717-4a0342b3-2eb5-43c8-a5c2-b0bd619b1c73] module.bx-vpc.ibm_is_subnet_network_acl_attachment.attach_frontend[2]: Refreshing state... [id=0737-bb30414f-fe7a-4589-9f5f-a1e51cb3935a] 2021/02/24 22:45:53 [WARN] ReferenceTransformer: reference not found: "var.ibm_region" module.vm-on-vpc.random_string.randomId[0]: Refreshing state... [id=7b6epm5q8geri95mawgj] module.vm-on-vpc.data.ibm_is_zones.ds_zones: Refreshing state... [id=2021-02-24 17:06:13.5667618 +0000 UTC] module.vm-on-vpc.data.ibm_resource_group.rg: Refreshing state... [id=6738b23ab80c48bb9dec551aa2b6a550] 2021/02/24 22:45:53 [WARN] ReferenceTransformer: reference not found: "path.module" 2021/02/24 22:45:53 [WARN] ReferenceTransformer: reference not found: "var.vpc_name" module.vm-on-vpc.data.template_file.user_data_with_blockstorage[0]: Refreshing state... [id=c72b642b8c271fdab9dc5c13aa7dfdd2db44a38c023b304293a39c51c1bb8620] module.vm-on-vpc.data.ibm_is_image.ubuntu: Refreshing state... [id=r006-ed3f775f-ad7e-4e37-ae62-7199b4988b00] 2021-02-24T22:45:53.713+0530 [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing" module.vm-on-vpc.data.ibm_is_vpc.ds_vpc: Refreshing state... [id=r006-ec7d34c8-b11e-4ec0-8037-78a49a70fb97] module.vm-on-vpc.data.ibm_is_ssh_key.existing_ssh_key: Refreshing state... [id=r006-64a91f52-7d9e-49f1-8b5e-cbe822b59aa0] 2021/02/24 22:45:54 [WARN] ReferenceTransformer: reference not found: "local.no_of_zones" 2021/02/24 22:45:54 [WARN] ReferenceTransformer: reference not found: "count.index" module.vm-on-vpc.data.ibm_is_subnet.test_subnet[0]: Refreshing state... [id=0717-4a0342b3-2eb5-43c8-a5c2-b0bd619b1c73] module.vm-on-vpc.ibm_is_volume.volume[0]: Refreshing state... [id=r006-a456e4e9-cf83-4e0e-bfdd-1780c4fafc52] module.vm-on-vpc.ibm_is_instance.vm[0]: Refreshing state... [id=0717_bf3f5950-c862-479c-aba5-f6b9b36a6b9c] 2021-02-24T22:46:00.097+0530 [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing" 2021/02/24 22:46:00 [INFO] backend/local: plan calling Plan 2021/02/24 22:46:00 [INFO] terraform: building graph: GraphTypePlan
2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "path.module" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021/02/24 22:46:00 [WARN] ReferenceTransformer: reference not found: "count.index" 2021-02-24T22:46:00.123+0530 [INFO] plugin: configuring client automatic mTLS 2021-02-24T22:46:00.156+0530 [INFO] plugin.terraform-provider-template_v2.2.0_x4: configuring server automatic mTLS: timestamp=2021-02-24T22:46:00.156+0530 2021-02-24T22:46:00.240+0530 [INFO] plugin: configuring client automatic mTLS 2021-02-24T22:46:00.241+0530 [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unimplemented desc = unknown service plugin.GRPCStdio" 2021-02-24T22:46:00.308+0530 [INFO] plugin.terraform-provider-ibm_v1.16.1: configuring server automatic mTLS: timestamp=2021-02-24T22:46:00.308+0530 2021-02-24T22:46:00.383+0530 [INFO] plugin: configuring client automatic mTLS 2021-02-24T22:46:00.415+0530 [INFO] plugin.terraform-provider-random_v3.1.0_x5: configuring server automatic mTLS: timestamp=2021-02-24T22:46:00.415+0530 2021/02/24 22:46:03 [WARN] ReferenceTransformer: reference not found: "var.ibm_region" 2021/02/24 22:46:03 [WARN] ReferenceTransformer: reference not found: "local.ibm_tags" 2021/02/24 22:46:03 [WARN] ReferenceTransformer: reference not found: "local.regionname" 2021/02/24 22:46:03 [WARN] ReferenceTransformer: reference not found: "var.ibm_env" 2021/02/24 22:46:03 [WARN] Provider "registry.terraform.io/ibm-cloud/ibm" produced an invalid plan for module.bx-vpc.ibm_is_vpc.vpc, but we are tolerating it because it is using the legacy plugin SDK. The following problems may be the cause of any confusing errors from downstream operations:
.primary_network_interface[0].security_groups: planned value cty.UnknownVal(cty.Set(cty.String)) does not match config value cty.SetVal([]cty.Value{cty.UnknownVal(cty.String)}) nor prior value cty.SetVal([]cty.Value{cty.StringVal("r006-28f9c9fc-f60f-4989-8ad4-7b2ae73e2d75")}) 2021-02-24T22:46:03.933+0530 [WARN] plugin.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = transport is closing" 2021/02/24 22:46:03 [INFO] backend/local: plan operation completed 2021/02/24 22:46:03 [INFO] backend/local: writing plan output to: test
# module.vm-on-vpc.ibm_is_instance.vm[0] must be replaced
-/+ resource "ibm_is_instance" "vm" {
~ gpu = [] -> (known after apply)
~ id = "0717_bf3f5950-c862-479c-aba5-f6b9b36a6b9c" -> (known after apply)
~ image = "r006-ed3f775f-ad7e-4e37-ae62-7199b4988b00" -> (known after apply)
~ keys = [
- "r006-64a91f52-7d9e-49f1-8b5e-cbe822b59aa0",
] -> (known after apply)
~ memory = 8 -> (known after apply)
name = "vm-test-1000-1"
profile = "bx2-2x8"
~ resource_controller_url = "https://cloud.ibm.com/vpc-ext/compute/vs" -> (known after apply)
~ resource_crn = "crn:v1:bluemix:public:is:us-south-1:a/931c0567c7d349a987f8b1bd5deb7178::instance:0717_bf3f5950-c862-479c-aba5-f6b9b36a6b9c" -> (known after apply)
~ resource_group = "04db140398064264a81ef91ad0853c50" -> (known after apply)
~ resource_group_name = "Default" -> (known after apply)
~ resource_name = "vm-test-1000-1" -> (known after apply)
~ resource_status = "running" -> (known after apply)
~ status = "running" -> (known after apply)
~ tags = [
- "env:test",
] -> (known after apply)
~ vcpu = [
- {
- architecture = "amd64"
- count = 2
},
] -> (known after apply)
~ volume_attachments = [
- {
- id = "0717-d57b04ba-2bdd-4975-af04-d1f62b08c3b2"
- name = "volume-attachment"
- volume_crn = "crn:v1:bluemix:public:is:us-south-1:a/931c0567c7d349a987f8b1bd5deb7178::volume:r006-5adbc945-0dbf-459e-b808-84f1f6e235ac"
- volume_id = "r006-5adbc945-0dbf-459e-b808-84f1f6e235ac"
- volume_name = "woken-unpaid-replace-stumble"
},
- {
- id = "0717-93a0e468-003a-408a-8eb6-a356b7045e9c"
- name = "volume-attachment"
- volume_crn = "crn:v1:bluemix:public:is:us-south-1:a/931c0567c7d349a987f8b1bd5deb7178::volume:r006-a456e4e9-cf83-4e0e-bfdd-1780c4fafc52"
- volume_id = "r006-a456e4e9-cf83-4e0e-bfdd-1780c4fafc52"
- volume_name = "vm-test-1000-1"
},
] -> (known after apply)
~ volumes = [
- "r006-a456e4e9-cf83-4e0e-bfdd-1780c4fafc52",
] -> (known after apply)
~ vpc = "r006-ec7d34c8-b11e-4ec0-8037-78a49a70fb97" -> (known after apply) # forces replacement
~ zone = "us-south-1" -> (known after apply) # forces replacement
~ boot_volume {
~ encryption = "crn:v1:bluemix:public:is:us-south-1:a/931c0567c7d349a987f8b1bd5deb7178::volume:r006-5adbc945-0dbf-459e-b808-84f1f6e235ac" -> (known after apply)
~ iops = 0 -> (known after apply)
~ name = "volume-attachment" -> (known after apply)
+ profile = (known after apply)
~ size = 0 -> (known after apply)
}
~ primary_network_interface {
allow_ip_spoofing = false
~ id = "0717-7115e790-c205-4ac6-bf9f-1647b0e279d1" -> (known after apply)
~ name = "sandstorm-suspense-slather-deprive" -> (known after apply)
- port_speed = 0 -> null
~ primary_ipv4_address = "10.20.0.20" -> (known after apply)
~ security_groups = [
- "r006-28f9c9fc-f60f-4989-8ad4-7b2ae73e2d75",
] -> (known after apply)
~ subnet = "0717-4a0342b3-2eb5-43c8-a5c2-b0bd619b1c73" -> (known after apply) # forces replacement
}
}
# module.vm-on-vpc.ibm_is_volume.volume[0] must be replaced
-/+ resource "ibm_is_volume" "volume" { capacity = 50 ~ crn = "crn:v1:bluemix:public:is:us-south-1:a/931c0567c7d349a987f8b1bd5deb7178::volume:r006-a456e4e9-cf83-4e0e-bfdd-1780c4fafc52" -> (known after apply)
Plan: 2 to add, 2 to change, 2 to destroy.
From the snippet we can see its doing a force new on VPCid, subnetid, zones....How does the ids of those resource getting changed..If possible can you share the url or configuration of modules...
@hkantare there isn't any change in VPCid, subnetid, zones , but still plan find the change.
the provisioned vpc , subnet and zones are same. test@root:~$ terraform state show module.vm-on-vpc.ibm_is_instance.vm[0]
resource "ibm_is_instance" "vm" { volumes = [ "r006-0af2aa2c-7c26-48c0-aba6-6491a9bc63b0", ] vpc = "r006-185276f5-da47-4629-9bb0-b3dfd0249d70" /// terraform show showing same id zone = "us-south-1" // terraform show showing same zone
primary_network_interface {
allow_ip_spoofing = false
id = "0717-47868167-388b-4e0b-9311-47b3713002c5"
name = "goatskin-survival-overstuff-cocoa"
port_speed = 0
primary_ipv4_address = "10.20.0.20"
security_groups = [
"r006-e23bfc85-4827-4ae2-85fd-c2c22b07f4fc",
]
subnet = "0717-e6ef115f-6471-4cfe-a3be-9ccc0c5b8ac5" /// terraform show showing subnet id
}
the provisioned VPC ,Subnet id and zone name are the same which provision on first try , but somehow on second try it find it different and try to destroy and recreate it.
i am sharing you the modules links soon.
This issue is not reproducible.
Closing the issue as there is no response from user.
Hi,
I have created TF modules for vpc and vm instance and calling those modules using root module. the dependency between modules are done using depends_no meta argument. on first try resources creation done successfully but when we apply it for the second time, it is forcing it to recreate the resources ( ibm_is_instance and ibm_is_volume ) even there is no change in state
Terraform Version
Terraform v0.13.5
The resources are created in VPC Gen2 using above ibm provider and terraform version.
Affected Resource(s)
Please list the resources as a list, for example:
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
Logs:
` the recreation happen due to changes found in below resource even there is no change.
for volume : zone for instance: vpc, subnet and zone
module.test-vm.ibm_is_instance.vm[0] must be replaced -/+ resource "ibm_is_instance" "vm" { ~ gpu = [] -> (known after apply) ~ id = "631383-c167-4b68-bb77-12987651" -> (known after apply)
module.test-vm.ibm_is_volume.volume[0] must be replaced -/+ resource "ibm_is_volume" "volume" { capacity = 50 ~ zone = "us-south-1" -> (known after apply) # forces replacement } `
Expected Behavior
no changes in plan , then recreation should not happen.
Steps to Reproduce
1 .
terraform plan -out
terraform apply
terraform plan -out
- it will shows 2 resource to add and 2 to destroy