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

feat: Add association_id arg for aws_eip_association + improve docs #40769

Merged

Conversation

acwwat
Copy link
Contributor

@acwwat acwwat commented Jan 4, 2025

Description

This PR is to add the association_id attribute to the aws_eip_association resource so that it is more aligned with typical convention with ID attributes. As per the original issue, the documentation has also been updated to include both id and association_id. Argument descriptions have also been updated to better reflect their specs.

Relations

Closes #40766

References

Referred to AssociateAddress for specs and wordings.

Output from Acceptance Testing

$ make testacc TESTS=TestAccEC2EIPAssociation_ PKG=ec2
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2EIPAssociation_'  -timeout 360m
2025/01/03 23:19:42 Initializing Terraform AWS Provider...
=== RUN   TestAccEC2EIPAssociation_basic
=== PAUSE TestAccEC2EIPAssociation_basic
=== RUN   TestAccEC2EIPAssociation_disappears
=== PAUSE TestAccEC2EIPAssociation_disappears
=== RUN   TestAccEC2EIPAssociation_instance
=== PAUSE TestAccEC2EIPAssociation_instance
=== RUN   TestAccEC2EIPAssociation_networkInterface
=== PAUSE TestAccEC2EIPAssociation_networkInterface
=== RUN   TestAccEC2EIPAssociation_spotInstance
=== PAUSE TestAccEC2EIPAssociation_spotInstance
=== CONT  TestAccEC2EIPAssociation_basic
=== CONT  TestAccEC2EIPAssociation_networkInterface
=== CONT  TestAccEC2EIPAssociation_spotInstance
=== CONT  TestAccEC2EIPAssociation_disappears
=== CONT  TestAccEC2EIPAssociation_instance
--- PASS: TestAccEC2EIPAssociation_networkInterface (29.52s)
--- PASS: TestAccEC2EIPAssociation_basic (136.30s)
--- PASS: TestAccEC2EIPAssociation_disappears (307.92s)
--- PASS: TestAccEC2EIPAssociation_spotInstance (326.89s)
--- PASS: TestAccEC2EIPAssociation_instance (327.16s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        327.435s

$

@acwwat acwwat requested a review from a team as a code owner January 4, 2025 04:32
Copy link

github-actions bot commented Jan 4, 2025

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. external-maintainer Contribution from a trusted external contributor. labels Jan 4, 2025
@acwwat acwwat force-pushed the f-aws_eip_association-add_assoc_id_attr branch from cbd9fa7 to afcfedb Compare January 4, 2025 04:33
@acwwat acwwat force-pushed the f-aws_eip_association-add_assoc_id_attr branch from afcfedb to ee601bc Compare January 4, 2025 04:52
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Jan 6, 2025
@gdavison gdavison self-assigned this Jan 6, 2025
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jan 6, 2025
@gdavison
Copy link
Contributor

gdavison commented Jan 7, 2025

Thanks for submitting this PR, @acwwat. I've made a few changes to the PR.

The attribute id is the correct attribute, as described in https://github.com/hashicorp/terraform-provider-aws/blob/main/docs/design-decisions/standardize-use-of-the-id-attribute.md, so I've removed the association_id attribute. I've also made some enhancements to the acceptance tests.

@ewbankkit ewbankkit added the enhancement Requests to existing resources that expand the functionality or scope. label Jan 7, 2025
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=TestAccEC2EIPAssociation_' PKG=ec2 ACCTEST_PARALLELISM=3
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.3 test ./internal/service/ec2/... -v -count 1 -parallel 3  -run=TestAccEC2EIPAssociation_ -timeout 360m
2025/01/07 08:42:26 Initializing Terraform AWS Provider...
=== RUN   TestAccEC2EIPAssociation_basic
=== PAUSE TestAccEC2EIPAssociation_basic
=== RUN   TestAccEC2EIPAssociation_disappears
=== PAUSE TestAccEC2EIPAssociation_disappears
=== RUN   TestAccEC2EIPAssociation_instance
=== PAUSE TestAccEC2EIPAssociation_instance
=== RUN   TestAccEC2EIPAssociation_networkInterface
=== PAUSE TestAccEC2EIPAssociation_networkInterface
=== RUN   TestAccEC2EIPAssociation_spotInstance
=== PAUSE TestAccEC2EIPAssociation_spotInstance
=== CONT  TestAccEC2EIPAssociation_basic
=== CONT  TestAccEC2EIPAssociation_networkInterface
=== CONT  TestAccEC2EIPAssociation_spotInstance
--- PASS: TestAccEC2EIPAssociation_networkInterface (23.28s)
=== CONT  TestAccEC2EIPAssociation_instance
--- PASS: TestAccEC2EIPAssociation_basic (138.48s)
=== CONT  TestAccEC2EIPAssociation_disappears
--- PASS: TestAccEC2EIPAssociation_spotInstance (140.16s)
--- PASS: TestAccEC2EIPAssociation_instance (138.53s)
--- PASS: TestAccEC2EIPAssociation_disappears (129.49s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	273.384s

@gdavison gdavison merged commit 2afc9cf into hashicorp:main Jan 7, 2025
48 checks passed
@github-actions github-actions bot added this to the v5.83.0 milestone Jan 7, 2025
Copy link

github-actions bot commented Jan 9, 2025

This functionality has been released in v5.83.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 github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. external-maintainer Contribution from a trusted external contributor. 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.

[Docs]: association_id does not exist. Please change it to just "id"
3 participants