Skip to content

On adding existing_vpc_id under vpcs map of landing-zone module, got vpc_data output issue #687

@nupurg-ibm

Description

@nupurg-ibm
  • Did terraform init which downloaded the landing-zone code
  • Then locally updated landing-zone-vpc module version to 7.13.1
  • Now tried adding existing_vpc_id under vpcs map of landing-zone module like below:
vpcs = var.vpc == null ? [
   {
     prefix                       = local.name
     existing_vpc_id              = "r010-b9904587-1eec-43bc-83ce-140abb22534d"
     resource_group               = var.resource_group == null ? "workload-rg" : var.resource_group
     clean_default_security_group = true
     clean_default_acl            = true
     flow_logs_bucket_name        = var.enable_vpc_flow_logs ? "vpc-flow-logs-bucket" : null
     network_acls = [
       {
         name              = "hpc-acl"
         add_cluster_rules = false
         rules             = local.network_acl_rules
       }
     ],
     subnets             = local.subnets
     use_public_gateways = local.use_public_gateways
     address_prefixes    = local.address_prefixes
   }
 ] : []
  • This gave error:
│ Error: Unsupported attribute
│ 
│   on .terraform/modules/hpc.landing_zone.landing_zone/outputs.tf line 210, in output "vpc_resource_list":
│  210:       name              = vpc.vpc_data.name
│     ├────────────────
│     │ vpc.vpc_data is tuple with 1 element
│ 
│ This value does not have any attributes.
╵
╷
│ Error: Unsupported attribute
│ 
│   on .terraform/modules/hpc.landing_zone.landing_zone/outputs.tf line 211, in output "vpc_resource_list":
│  211:       resource_group_id = vpc.vpc_data.resource_group
│     ├────────────────
│     │ vpc.vpc_data is tuple with 1 element
│ 
│ This value does not have any attributes.
╵
╷
│ Error: Unsupported attribute
│ 
│   on .terraform/modules/hpc.landing_zone.landing_zone/outputs.tf line 214, in output "vpc_resource_list":
│  214:         cluster.id if cluster.vpc_id == vpc.vpc_data.id
│     ├────────────────
│     │ vpc.vpc_data is tuple with 1 element
│ 
│ This value does not have any attributes. 

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions