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

Use IPAM with provided CIDR block to create VPC #1110

Closed
nhhai opened this issue Aug 7, 2024 · 3 comments
Closed

Use IPAM with provided CIDR block to create VPC #1110

nhhai opened this issue Aug 7, 2024 · 3 comments
Labels

Comments

@nhhai
Copy link

nhhai commented Aug 7, 2024

Is your request related to a new offering from AWS?

Yes, can do with the current capabilities.

Is your request related to a problem? Please describe.

In my current organization, people use convention to manage the CIDR blocks for different env / subnets.
E.g: For x.y.0.0/16 VPCs, use y < 100 for prod and stage, use y from 100-199 for dev...

We have existing VPCs and now we're refactoring to use IPAM. We want to keep the current CIDRs block while migrating. It's currently impossible because IPAM only works with netmask_length.

The example here: https://github.com/terraform-aws-modules/terraform-aws-vpc/blob/master/examples/ipam/main.tf#L46 is incorrect, it doesn't work because in the main.tf file, cidr and ipam are exclusive: https://github.com/terraform-aws-modules/terraform-aws-vpc/blob/master/main.tf#L31

Describe the solution you'd like.

I think IPAM should be possible to use with provided CIDRs, as many of us are migrating to it, and also want to avoid future overlapping. It's also easier in case of adding / removing subnets.

Though I think this is more on AWS side that they should support them. As a workaround for now, I think when both ipv4_ipam_pool_id and cidr are provided, the VPC should be created without using IPAM, then create an vpc_ipam_pool_cidr_allocation resource to mark that block in the pool.

I haven't tried this, so this is simply a theory.

Describe alternatives you've considered.

Well, wait for AWS to support this in their VPC creation of course.

Copy link

github-actions bot commented Sep 7, 2024

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

@github-actions github-actions bot added the stale label Sep 7, 2024
Copy link

This issue was automatically closed because of stale in 10 days

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2024
Copy link

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant