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

r/aws_eip enhancement IPAM pool allocation #39604

Merged
merged 7 commits into from
Oct 8, 2024

Conversation

alexbacchin
Copy link
Contributor

@alexbacchin alexbacchin commented Oct 6, 2024

Description

This enhancement will support EIP allocation from an AWS IPAM pool of Amazon supplied public IPs or BYO public IP address to IPAM

  • Added the ipam_pool_id attribute to support EIP allocation from IPAM Pool

Relations

Closes #39080
Closes #39449
Relates #39124

References

https://docs.aws.amazon.com/vpc/latest/ipam/tutorials-eip-pool.html

Output from Acceptance Testing

% make testacc TESTS=TestAccEC2EIP_PublicIPv4Pool_IPAMPoolId PKG=ec2
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.1 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2EIP_PublicIPv4Pool_IPAMPoolId'  -timeout 360m
=== RUN   TestAccEC2EIP_PublicIPv4Pool_IPAMPoolId
=== PAUSE TestAccEC2EIP_PublicIPv4Pool_IPAMPoolId
=== CONT  TestAccEC2EIP_PublicIPv4Pool_IPAMPoolId
--- PASS: TestAccEC2EIP_PublicIPv4Pool_IPAMPoolId (87.46s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        87.546s
...

Copy link

github-actions bot commented Oct 6, 2024

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • 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 documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ec2 Issues and PRs that pertain to the ec2 service. needs-triage Waiting for first response or review from a maintainer. labels Oct 6, 2024
@alexbacchin alexbacchin marked this pull request as ready for review October 6, 2024 10:55
@alexbacchin alexbacchin requested a review from a team as a code owner October 6, 2024 10:55
@alexbacchin alexbacchin changed the title r/aws_eip added support to IPAM Pool allocation r/aws_eip enhancement IPAM pool allocation Oct 8, 2024
@ewbankkit ewbankkit 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 8, 2024
@ewbankkit ewbankkit self-assigned this Oct 8, 2024
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Oct 8, 2024
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccEC2EIP_\|TestAccEC2EIPDataSource_' PKG=ec2 ACCTEST_PARALLELISM=3
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/ec2/... -v -count 1 -parallel 3  -run=TestAccEC2EIP_\|TestAccEC2EIPDataSource_ -timeout 360m
=== RUN   TestAccEC2EIPDataSource_filter
=== PAUSE TestAccEC2EIPDataSource_filter
=== RUN   TestAccEC2EIPDataSource_id
=== PAUSE TestAccEC2EIPDataSource_id
=== RUN   TestAccEC2EIPDataSource_publicIP
=== PAUSE TestAccEC2EIPDataSource_publicIP
=== RUN   TestAccEC2EIPDataSource_tags
=== PAUSE TestAccEC2EIPDataSource_tags
=== RUN   TestAccEC2EIPDataSource_networkInterface
=== PAUSE TestAccEC2EIPDataSource_networkInterface
=== RUN   TestAccEC2EIPDataSource_instance
=== PAUSE TestAccEC2EIPDataSource_instance
=== RUN   TestAccEC2EIPDataSource_carrierIP
=== PAUSE TestAccEC2EIPDataSource_carrierIP
=== RUN   TestAccEC2EIPDataSource_customerOwnedIPv4Pool
=== PAUSE TestAccEC2EIPDataSource_customerOwnedIPv4Pool
=== RUN   TestAccEC2EIP_basic
=== PAUSE TestAccEC2EIP_basic
=== RUN   TestAccEC2EIP_disappears
=== PAUSE TestAccEC2EIP_disappears
=== RUN   TestAccEC2EIP_migrateVPCToDomain
=== PAUSE TestAccEC2EIP_migrateVPCToDomain
=== RUN   TestAccEC2EIP_noVPC
=== PAUSE TestAccEC2EIP_noVPC
=== RUN   TestAccEC2EIP_tags
=== PAUSE TestAccEC2EIP_tags
=== RUN   TestAccEC2EIP_instance
=== PAUSE TestAccEC2EIP_instance
=== RUN   TestAccEC2EIP_Instance_reassociate
=== PAUSE TestAccEC2EIP_Instance_reassociate
=== RUN   TestAccEC2EIP_Instance_associatedUserPrivateIP
=== PAUSE TestAccEC2EIP_Instance_associatedUserPrivateIP
=== RUN   TestAccEC2EIP_Instance_notAssociated
=== PAUSE TestAccEC2EIP_Instance_notAssociated
=== RUN   TestAccEC2EIP_networkInterface
=== PAUSE TestAccEC2EIP_networkInterface
=== RUN   TestAccEC2EIP_NetworkInterface_twoEIPsOneInterface
=== PAUSE TestAccEC2EIP_NetworkInterface_twoEIPsOneInterface
=== RUN   TestAccEC2EIP_association
=== PAUSE TestAccEC2EIP_association
=== RUN   TestAccEC2EIP_PublicIPv4Pool_default
=== PAUSE TestAccEC2EIP_PublicIPv4Pool_default
=== RUN   TestAccEC2EIP_PublicIPv4Pool_custom
    ec2_eip_test.go:476: Environment variable AWS_EC2_EIP_PUBLIC_IPV4_POOL is not set
--- SKIP: TestAccEC2EIP_PublicIPv4Pool_custom (0.00s)
=== RUN   TestAccEC2EIP_PublicIPv4Pool_IPAMPoolId
=== PAUSE TestAccEC2EIP_PublicIPv4Pool_IPAMPoolId
=== RUN   TestAccEC2EIP_customerOwnedIPv4Pool
=== PAUSE TestAccEC2EIP_customerOwnedIPv4Pool
=== RUN   TestAccEC2EIP_networkBorderGroup
=== PAUSE TestAccEC2EIP_networkBorderGroup
=== RUN   TestAccEC2EIP_carrierIP
=== PAUSE TestAccEC2EIP_carrierIP
=== RUN   TestAccEC2EIP_BYOIPAddress_default
=== PAUSE TestAccEC2EIP_BYOIPAddress_default
=== RUN   TestAccEC2EIP_BYOIPAddress_custom
    ec2_eip_test.go:648: Environment variable AWS_EC2_EIP_BYOIP_ADDRESS is not set
--- SKIP: TestAccEC2EIP_BYOIPAddress_custom (0.00s)
=== RUN   TestAccEC2EIP_BYOIPAddress_customWithPublicIPv4Pool
    ec2_eip_test.go:677: Environment variable AWS_EC2_EIP_BYOIP_ADDRESS is not set
--- SKIP: TestAccEC2EIP_BYOIPAddress_customWithPublicIPv4Pool (0.00s)
=== CONT  TestAccEC2EIPDataSource_filter
=== CONT  TestAccEC2EIP_instance
=== CONT  TestAccEC2EIP_PublicIPv4Pool_default
--- PASS: TestAccEC2EIPDataSource_filter (12.80s)
=== CONT  TestAccEC2EIP_networkBorderGroup
--- PASS: TestAccEC2EIP_PublicIPv4Pool_default (15.00s)
=== CONT  TestAccEC2EIP_customerOwnedIPv4Pool
    ec2_eip_test.go:538: skipping since no Outposts found
--- SKIP: TestAccEC2EIP_customerOwnedIPv4Pool (0.43s)
=== CONT  TestAccEC2EIP_BYOIPAddress_default
--- PASS: TestAccEC2EIP_BYOIPAddress_default (11.75s)
=== CONT  TestAccEC2EIP_PublicIPv4Pool_IPAMPoolId
--- PASS: TestAccEC2EIP_networkBorderGroup (14.52s)
=== CONT  TestAccEC2EIP_carrierIP
--- PASS: TestAccEC2EIP_carrierIP (16.10s)
=== CONT  TestAccEC2EIP_networkInterface
--- PASS: TestAccEC2EIP_networkInterface (24.35s)
=== CONT  TestAccEC2EIPDataSource_customerOwnedIPv4Pool
    ec2_eip_data_source_test.go:188: skipping since no Outposts found
--- SKIP: TestAccEC2EIPDataSource_customerOwnedIPv4Pool (0.19s)
=== CONT  TestAccEC2EIP_association
--- PASS: TestAccEC2EIP_PublicIPv4Pool_IPAMPoolId (75.27s)
=== CONT  TestAccEC2EIP_tags
--- PASS: TestAccEC2EIP_instance (124.42s)
=== CONT  TestAccEC2EIP_NetworkInterface_twoEIPsOneInterface
--- PASS: TestAccEC2EIP_tags (31.08s)
=== CONT  TestAccEC2EIP_noVPC
--- PASS: TestAccEC2EIP_NetworkInterface_twoEIPsOneInterface (21.57s)
=== CONT  TestAccEC2EIP_migrateVPCToDomain
--- PASS: TestAccEC2EIP_noVPC (14.78s)
=== CONT  TestAccEC2EIP_Instance_associatedUserPrivateIP
--- PASS: TestAccEC2EIP_migrateVPCToDomain (30.40s)
=== CONT  TestAccEC2EIP_disappears
--- PASS: TestAccEC2EIP_disappears (12.42s)
=== CONT  TestAccEC2EIP_Instance_notAssociated
--- PASS: TestAccEC2EIP_association (188.69s)
=== CONT  TestAccEC2EIP_basic
--- PASS: TestAccEC2EIP_basic (13.69s)
=== CONT  TestAccEC2EIP_Instance_reassociate
--- PASS: TestAccEC2EIP_Instance_notAssociated (128.24s)
=== CONT  TestAccEC2EIPDataSource_networkInterface
--- PASS: TestAccEC2EIPDataSource_networkInterface (21.86s)
=== CONT  TestAccEC2EIPDataSource_carrierIP
--- PASS: TestAccEC2EIP_Instance_associatedUserPrivateIP (197.36s)
=== CONT  TestAccEC2EIPDataSource_instance
--- PASS: TestAccEC2EIPDataSource_carrierIP (13.31s)
=== CONT  TestAccEC2EIPDataSource_publicIP
--- PASS: TestAccEC2EIPDataSource_publicIP (12.35s)
=== CONT  TestAccEC2EIPDataSource_id
--- PASS: TestAccEC2EIPDataSource_id (12.09s)
=== CONT  TestAccEC2EIPDataSource_tags
--- PASS: TestAccEC2EIPDataSource_tags (12.10s)
--- PASS: TestAccEC2EIP_Instance_reassociate (157.73s)
--- PASS: TestAccEC2EIPDataSource_instance (124.39s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	475.560s

@ewbankkit
Copy link
Contributor

@alexbacchin Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 96cc77a into hashicorp:main Oct 8, 2024
41 checks passed
@github-actions github-actions bot added this to the v5.71.0 milestone Oct 8, 2024
@alexbacchin alexbacchin deleted the f-aws_eip-ipampool branch October 8, 2024 23:34
alexbacchin added a commit to alexbacchin/terraform-provider-aws that referenced this pull request Oct 9, 2024
ewbankkit added a commit that referenced this pull request Oct 9, 2024
…changed

b/aws_eip reverse network_border_group change introduced by PR #39604
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Oct 15, 2024
Copy link

This functionality has been released in v5.72.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. 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]: EIP support for AWS provided public IP Pools Amazon-provided contiguous IPv4 blocks
2 participants