terraform-aws-modules / terraform-aws-vpc

Terraform module to create AWS VPC resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/vpc/aws
Apache License 2.0
2.99k stars 4.44k forks source link

fix: Parameter cidr_block set to null if use_ipam_pool set to true #911

Closed osaluden closed 1 year ago

osaluden commented 1 year ago

Description

cidr_block parameter is set to null when use_ipam_pool varaiable is set to true. Thus, only ipv4_netmask_length is available when you want to use IPAM. However, it is possible to chose the CIDR rather than the netmask length as the example shows at line 44.

Motivation and Context

Want to be able to use IPAM with CIDR selection, not only with netmask length selection.

Breaking Changes

No breaking changes.

How Has This Been Tested?

osaluden commented 1 year ago

Hi there

After several tests an deployment, I discovered that if the parameter use_ipam_pool is set to false, it is still possible to use the ipv4_ipam_pool_id parameter to register the VPC CIDR into the desired IPAM pool. This way, the cidr parameter can be used as well as ipv4_netmask_length if you want to ask IPAM to provided you with a CIDR range with the desired netmask length.

Let's close the pull request.

github-actions[bot] commented 1 year ago

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.