terraform-aws-dynamic-subnets icon indicating copy to clipboard operation
terraform-aws-dynamic-subnets copied to clipboard

us-west-1 AZs causes an Index error

Open computerdeath opened this issue 9 months ago • 0 comments

Describe the Bug

When attempting to create a subnet in us-west-1 AZs I get the following error

Error: Invalid index
 on .terraform/modules/Perforce-private-subnet/outputs.tf line 9, in output "availability_zone_ids":
    9:     for az in local.vpc_availability_zones : local.az_name_map[az]
      local.az_name_map is map of string with 2 elements

 The given key does not identify an element in this collection value.

This error occurs with any number of us-west-1 AZs provided, switching to another region AZ like us-east-1 or us-west-2 resolves the error

availability_zones = ["us-west-1a", "us-west-1b"]

Expected Behavior

Deployment should succeed with us-west-1

Steps to Reproduce

Use us-west-1 AZs availability_zones = ["us-west-1a", "us-west-1b"]

Screenshots

No response

Environment

Module: 2.4.2 Opentofu: 1.8.8 Macos: 14.1

Additional Context

No response

computerdeath avatar Jan 08 '25 03:01 computerdeath