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

aws_nat_gateway: add association_id attribute to resource and data source #30546

Merged

Conversation

roberth-k
Copy link
Contributor

Description

Adds the association_id attribute to the aws_nat_gateway resource and data source.

The association_id (and other attributes, such as allocation_id) are now chosen based on whether a given IP address is designated as the primary IP address of the NAT Gateway.

A subsequent PR will add secondary associations as an independent resource.

Relations

Relates #29471

References

Output from Acceptance Testing

$ make testacc TESTS=TestAccVPCNATGateway_ PKG=ec2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCNATGateway_'  -timeout 180m
go: downloading github.com/aws/aws-sdk-go-v2/service/healthlake v1.15.7
=== RUN   TestAccVPCNATGateway_basic
=== PAUSE TestAccVPCNATGateway_basic
=== RUN   TestAccVPCNATGateway_disappears
=== PAUSE TestAccVPCNATGateway_disappears
=== RUN   TestAccVPCNATGateway_ConnectivityType_private
=== PAUSE TestAccVPCNATGateway_ConnectivityType_private
=== RUN   TestAccVPCNATGateway_privateIP
=== PAUSE TestAccVPCNATGateway_privateIP
=== RUN   TestAccVPCNATGateway_tags
=== PAUSE TestAccVPCNATGateway_tags
=== CONT  TestAccVPCNATGateway_basic
=== CONT  TestAccVPCNATGateway_privateIP
=== CONT  TestAccVPCNATGateway_ConnectivityType_private
=== CONT  TestAccVPCNATGateway_disappears
=== CONT  TestAccVPCNATGateway_tags
--- PASS: TestAccVPCNATGateway_ConnectivityType_private (188.09s)
--- PASS: TestAccVPCNATGateway_basic (195.61s)
--- PASS: TestAccVPCNATGateway_privateIP (200.23s)
--- PASS: TestAccVPCNATGateway_disappears (233.69s)
--- PASS: TestAccVPCNATGateway_tags (248.98s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        251.101s

$ make testacc TESTS=TestAccVPCNATGatewayDataSource_ PKG=ec2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCNATGatewayDataSource_'  -timeout 180m
=== RUN   TestAccVPCNATGatewayDataSource_basic
=== PAUSE TestAccVPCNATGatewayDataSource_basic
=== CONT  TestAccVPCNATGatewayDataSource_basic
--- PASS: TestAccVPCNATGatewayDataSource_basic (206.06s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        208.112s

@github-actions
Copy link

github-actions bot commented Apr 8, 2023

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. service/vpc Issues and PRs that pertain to the vpc service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/S Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. labels Apr 8, 2023
@roberth-k roberth-k changed the title F aws nat gateway secondary allocations 2 aws_nat_gateway: add association_id attribute to resource and data source Apr 8, 2023
@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 Apr 10, 2023
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=TestAccVPCNATGateway' PKG=ec2 ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 3  -run=TestAccVPCNATGateway -timeout 180m
=== RUN   TestAccVPCNATGatewayDataSource_basic
=== PAUSE TestAccVPCNATGatewayDataSource_basic
=== RUN   TestAccVPCNATGateway_basic
=== PAUSE TestAccVPCNATGateway_basic
=== RUN   TestAccVPCNATGateway_disappears
=== PAUSE TestAccVPCNATGateway_disappears
=== RUN   TestAccVPCNATGateway_ConnectivityType_private
=== PAUSE TestAccVPCNATGateway_ConnectivityType_private
=== RUN   TestAccVPCNATGateway_privateIP
=== PAUSE TestAccVPCNATGateway_privateIP
=== RUN   TestAccVPCNATGateway_tags
=== PAUSE TestAccVPCNATGateway_tags
=== RUN   TestAccVPCNATGatewaysDataSource_basic
=== PAUSE TestAccVPCNATGatewaysDataSource_basic
=== CONT  TestAccVPCNATGatewayDataSource_basic
=== CONT  TestAccVPCNATGateway_privateIP
=== CONT  TestAccVPCNATGateway_disappears
--- PASS: TestAccVPCNATGatewayDataSource_basic (147.75s)
=== CONT  TestAccVPCNATGateway_ConnectivityType_private
--- PASS: TestAccVPCNATGateway_privateIP (169.30s)
=== CONT  TestAccVPCNATGateway_basic
--- PASS: TestAccVPCNATGateway_disappears (195.81s)
=== CONT  TestAccVPCNATGatewaysDataSource_basic
--- PASS: TestAccVPCNATGateway_ConnectivityType_private (178.33s)
=== CONT  TestAccVPCNATGateway_tags
--- PASS: TestAccVPCNATGateway_basic (188.52s)
--- PASS: TestAccVPCNATGatewaysDataSource_basic (202.64s)
--- PASS: TestAccVPCNATGateway_tags (239.90s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	571.281s

@ewbankkit
Copy link
Contributor

@roberth-k Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 9cf213f into hashicorp:main Apr 10, 2023
@github-actions github-actions bot added this to the v4.63.0 milestone Apr 10, 2023
@github-actions
Copy link

This functionality has been released in v4.63.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!

@github-actions
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 May 15, 2023
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/vpc Issues and PRs that pertain to the vpc service. size/S 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.

2 participants