Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vpc: subnets module does not support Melbourne region #1047

Closed
mtb-xt opened this issue May 27, 2024 · 0 comments · Fixed by #1048
Closed

vpc: subnets module does not support Melbourne region #1047

mtb-xt opened this issue May 27, 2024 · 0 comments · Fixed by #1048
Labels
bug 🐛 An issue with the system

Comments

@mtb-xt
Copy link
Contributor

mtb-xt commented May 27, 2024

Describe the Bug

VPC component in this repo uses subnets module version, that doesn't support Melbourne opt-in region (ap-southeast-4).
vpc/main.tf#L142

The issue is that cloudposse/dynamic-subnets/aws version 2.3.0 uses cloudposse/utils version 1.1.0, which was released when Melbourne wasn't in its code.

cloudposse/dynamic-subnets/aws 2.4.0 uses cloudposse/utils version 1.3.0, which includes support for Melbourne
(It was actually added in utils 1.2.0 - cloudposse/terraform-aws-utils#26)

It would be great, if this component could be updated to use cloudposse/dynamic-subnets/aws 2.4.0 or higher.

Expected Behavior

Deployment of a vpc works in ap-southeast-4.

Steps to Reproduce

Use the VPC component with these variables:

# Variables for the component 'vpc' in the stack 'core-apse4-network':
availability_zones:
- a
- b
- c
enabled: true
environment: apse4
map_public_ip_on_launch: false
max_subnet_count: 3
region: ap-southeast-4
stage: network

run the stack and observe the error atmos terraform apply vpc -s core-apse4-network

Planning failed. Terraform encountered an error while generating this plan.

│ Error: Invalid index
│
│   on .terraform/modules/subnets/main.tf line 71, in locals:
│   71:   subnet_az_abbreviations = [for az in local.subnet_availability_zones : local.az_abbreviation_map[az]]
│     ├────────────────
│     │ local.az_abbreviation_map is object with 271 attributes
│
│ The given key does not identify an element in this collection value.
╵
╷
│ Error: Invalid index
│
│   on .terraform/modules/subnets/main.tf line 71, in locals:
│   71:   subnet_az_abbreviations = [for az in local.subnet_availability_zones : local.az_abbreviation_map[az]]
│     ├────────────────
│     │ local.az_abbreviation_map is object with 271 attributes
│
│ The given key does not identify an element in this collection value.
╵
╷
│ Error: Invalid index
│
│   on .terraform/modules/subnets/main.tf line 71, in locals:
│   71:   subnet_az_abbreviations = [for az in local.subnet_availability_zones : local.az_abbreviation_map[az]]
│     ├────────────────
│     │ local.az_abbreviation_map is object with 271 attributes
│
│ The given key does not identify an element in this collection value.
╵
exit status 1

Screenshots

No response

Environment

No response

Additional Context

No response

@mtb-xt mtb-xt added the bug 🐛 An issue with the system label May 27, 2024
@mtb-xt mtb-xt changed the title vpc: subnets component does not support Melbourne region vpc: subnets module does not support Melbourne region May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant