Skip to content

Conversation

@rohank25
Copy link

@rohank25 rohank25 commented Oct 19, 2025

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

None

Description

  • Support provisioning of VPC Resource Planning IPAM Pools
  • Support provisioning of subnet cidrs from IPAM Pools
  • Graceful deletion of IPAM pool cidrs with VPC / Subnet allocations.

Notes

I faced issues when attempting to delete ipam pool cidrs (to simulate a full end-to-end configuration) because of eventual consistency issues with ipam pool allocations. My attempt at resolving this is to check which vpc / subnet allocations are within the cidr, and wait for those to be released (takes 20 mins).

I still need to fix eventual consistency issues when provisioning vpc / subnet resources across accounts / regions.

Unfortunately, running acceptance tests takes a while since IPAM is restricted to 1 per account. If you have any suggestions on how to overcome this issue, please let me know, thanks!

Relations

Closes #34615

References

Output from Acceptance Testing

WIP

λ TF_ACC=1 go1.24.8 test ./internal/service/ec2/... -v -count 1 -parallel 1 -run='TestAccIPAMPool_'  -timeout 360m -vet=off | tee -a TestAccIPAMPool.out
2025/10/26 02:05:12 Creating Terraform AWS Provider (SDKv2-style)...
2025/10/26 02:05:12 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccIPAMPool_basic
=== PAUSE TestAccIPAMPool_basic
=== RUN   TestAccIPAMPool_disappears
=== PAUSE TestAccIPAMPool_disappears
=== RUN   TestAccIPAMPool_ipv6Basic
=== PAUSE TestAccIPAMPool_ipv6Basic
=== RUN   TestAccIPAMPool_ipv6PublicIPAmazon
=== PAUSE TestAccIPAMPool_ipv6PublicIPAmazon
=== RUN   TestAccIPAMPool_ipv6Contiguous
=== PAUSE TestAccIPAMPool_ipv6Contiguous
=== RUN   TestAccIPAMPool_cascade
=== PAUSE TestAccIPAMPool_cascade
=== RUN   TestAccIPAMPool_tags
=== PAUSE TestAccIPAMPool_tags
=== RUN   TestAccIPAMPool_ipv6PrivateScope
=== PAUSE TestAccIPAMPool_ipv6PrivateScope
=== RUN   TestAccIPAMPool_ResourcePlanningVPC_ipv4
=== PAUSE TestAccIPAMPool_ResourcePlanningVPC_ipv4
=== RUN   TestAccIPAMPool_ResourcePlanningVPC_ipv6
=== PAUSE TestAccIPAMPool_ResourcePlanningVPC_ipv6
=== RUN   TestAccIPAMPool_ResourcePlanningVPC_sourceResourceUpdate
=== PAUSE TestAccIPAMPool_ResourcePlanningVPC_sourceResourceUpdate
=== RUN   TestAccIPAMPool_ResourcePlanningVPC_crossRegion
=== PAUSE TestAccIPAMPool_ResourcePlanningVPC_crossRegion
=== CONT  TestAccIPAMPool_basic
--- PASS: TestAccIPAMPool_basic (69.04s)
=== CONT  TestAccIPAMPool_tags
--- PASS: TestAccIPAMPool_tags (60.06s)
=== CONT  TestAccIPAMPool_ResourcePlanningVPC_crossRegion
--- PASS: TestAccIPAMPool_ResourcePlanningVPC_crossRegion (1711.90s)
=== CONT  TestAccIPAMPool_ResourcePlanningVPC_sourceResourceUpdate
=== CONT  TestAccIPAMPool_ResourcePlanningVPC_ipv6
--- PASS: TestAccIPAMPool_ResourcePlanningVPC_sourceResourceUpdate (2307.33s)
--- PASS: TestAccIPAMPool_ResourcePlanningVPC_ipv6 (1712.33s)
=== CONT  TestAccIPAMPool_ResourcePlanningVPC_ipv4
=== CONT  TestAccIPAMPool_ipv6PrivateScope
--- PASS: TestAccIPAMPool_ResourcePlanningVPC_ipv4 (1680.15s)
--- PASS: TestAccIPAMPool_ipv6PrivateScope (59.64s)
=== CONT  TestAccIPAMPool_ipv6PublicIPAmazon
--- PASS: TestAccIPAMPool_ipv6PublicIPAmazon (37.23s)
=== CONT  TestAccIPAMPool_cascade
--- PASS: TestAccIPAMPool_cascade (60.11s)
=== CONT  TestAccIPAMPool_ipv6Contiguous
--- PASS: TestAccIPAMPool_ipv6Contiguous (42.15s)
=== CONT  TestAccIPAMPool_ipv6Basic
--- PASS: TestAccIPAMPool_ipv6Basic (57.23s)
=== CONT  TestAccIPAMPool_disappears
--- PASS: TestAccIPAMPool_disappears (69.37s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        7871.023s
λ TF_ACC=1 go1.24.8 test ./internal/service/ec2/... -v -count 1 -parallel 1 -run='TestAccIPAMPoolDataSource'  -timeout 360m -vet=off | tee -a TestAccIPAMPoolDataSource.out
2025/10/26 12:51:24 Creating Terraform AWS Provider (SDKv2-style)...
2025/10/26 12:51:24 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccIPAMPoolDataSource_basic
=== PAUSE TestAccIPAMPoolDataSource_basic
=== RUN   TestAccIPAMPoolDataSource_sourceResourceVPC
=== PAUSE TestAccIPAMPoolDataSource_sourceResourceVPC
=== CONT  TestAccIPAMPoolDataSource_basic
--- PASS: TestAccIPAMPoolDataSource_basic (45.77s)
=== CONT  TestAccIPAMPoolDataSource_sourceResourceVPC
--- PASS: TestAccIPAMPoolDataSource_sourceResourceVPC (1719.08s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        1769.207s
λ TF_ACC=1 go1.24.8 test ./internal/service/ec2/... -v -count 1 -parallel 1 -run='TestAccIPAMPoolCIDR'  -timeout 360m -vet=off | tee -a TestAccIPAMPoolCIDR.out 
2025/10/26 15:33:15 Creating Terraform AWS Provider (SDKv2-style)...
2025/10/26 15:33:15 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccIPAMPoolCIDRAllocation_ipv4Basic
=== PAUSE TestAccIPAMPoolCIDRAllocation_ipv4Basic
=== RUN   TestAccIPAMPoolCIDRAllocation_ipv4Description
=== PAUSE TestAccIPAMPoolCIDRAllocation_ipv4Description
=== RUN   TestAccIPAMPoolCIDRAllocation_disappears
=== PAUSE TestAccIPAMPoolCIDRAllocation_disappears
=== RUN   TestAccIPAMPoolCIDRAllocation_ipv4BasicNetmask
=== PAUSE TestAccIPAMPoolCIDRAllocation_ipv4BasicNetmask
=== RUN   TestAccIPAMPoolCIDRAllocation_ipv4DisallowedCIDR
=== PAUSE TestAccIPAMPoolCIDRAllocation_ipv4DisallowedCIDR
=== RUN   TestAccIPAMPoolCIDRAllocation_multiple
=== PAUSE TestAccIPAMPoolCIDRAllocation_multiple
=== RUN   TestAccIPAMPoolCIDRAllocation_differentRegion
=== PAUSE TestAccIPAMPoolCIDRAllocation_differentRegion
=== RUN   TestAccIPAMPoolCIDR_basic
=== PAUSE TestAccIPAMPoolCIDR_basic
=== RUN   TestAccIPAMPoolCIDR_basicNetmaskLength
=== PAUSE TestAccIPAMPoolCIDR_basicNetmaskLength
=== RUN   TestAccIPAMPoolCIDR_disappears
=== PAUSE TestAccIPAMPoolCIDR_disappears
=== RUN   TestAccIPAMPoolCIDR_Disappears_ipam
=== PAUSE TestAccIPAMPoolCIDR_Disappears_ipam
=== RUN   TestAccIPAMPoolCIDR_VPCAllocation
=== PAUSE TestAccIPAMPoolCIDR_VPCAllocation
=== RUN   TestAccIPAMPoolCIDR_VPCAllocation_crossRegion
=== PAUSE TestAccIPAMPoolCIDR_VPCAllocation_crossRegion
=== RUN   TestAccIPAMPoolCIDRsDataSource_basic
=== PAUSE TestAccIPAMPoolCIDRsDataSource_basic
=== CONT  TestAccIPAMPoolCIDRAllocation_ipv4Basic
--- PASS: TestAccIPAMPoolCIDRAllocation_ipv4Basic (75.32s)
=== CONT  TestAccIPAMPoolCIDR_basic
--- PASS: TestAccIPAMPoolCIDR_basic (79.35s)
=== CONT  TestAccIPAMPoolCIDRsDataSource_basic
--- PASS: TestAccIPAMPoolCIDRsDataSource_basic (91.15s)
=== CONT  TestAccIPAMPoolCIDR_VPCAllocation_crossRegion
--- PASS: TestAccIPAMPoolCIDR_VPCAllocation_crossRegion (1189.25s)
=== CONT  TestAccIPAMPoolCIDR_VPCAllocation
--- PASS: TestAccIPAMPoolCIDR_VPCAllocation (1201.32s)
=== CONT  TestAccIPAMPoolCIDR_Disappears_ipam
--- PASS: TestAccIPAMPoolCIDR_Disappears_ipam (80.02s)
=== CONT  TestAccIPAMPoolCIDR_disappears
--- PASS: TestAccIPAMPoolCIDR_disappears (57.62s)
=== CONT  TestAccIPAMPoolCIDR_basicNetmaskLength
--- PASS: TestAccIPAMPoolCIDR_basicNetmaskLength (101.36s)
=== CONT  TestAccIPAMPoolCIDRAllocation_ipv4DisallowedCIDR
--- PASS: TestAccIPAMPoolCIDRAllocation_ipv4DisallowedCIDR (68.21s)
=== CONT  TestAccIPAMPoolCIDRAllocation_differentRegion
--- PASS: TestAccIPAMPoolCIDRAllocation_differentRegion (84.45s)
=== CONT  TestAccIPAMPoolCIDRAllocation_multiple
--- PASS: TestAccIPAMPoolCIDRAllocation_multiple (86.43s)
=== CONT  TestAccIPAMPoolCIDRAllocation_disappears
--- PASS: TestAccIPAMPoolCIDRAllocation_disappears (72.48s)
=== CONT  TestAccIPAMPoolCIDRAllocation_ipv4BasicNetmask
--- PASS: TestAccIPAMPoolCIDRAllocation_ipv4BasicNetmask (76.62s)
=== CONT  TestAccIPAMPoolCIDRAllocation_ipv4Description
--- PASS: TestAccIPAMPoolCIDRAllocation_ipv4Description (112.06s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        3380.021s

@github-actions
Copy link
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/vpc Issues and PRs that pertain to the vpc service. size/XL Managed by automation to categorize the size of a PR. labels Oct 19, 2025
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Requests to existing resources that expand the functionality or scope. service/vpc Issues and PRs that pertain to the vpc service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement]: IPAM subnet reservations

2 participants