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_ec2_instance: allow adjusting ipv6_address_count without replacing the instance #36308

Merged

Conversation

hfinucane
Copy link

Description

This will allow adjusting the ipv6_address_count address on an instance's primary NIC without replacing the instance.

Relations

Closes #33707

Output from Acceptance Testing

% make testacc TESTS=TestAccEC2Instance_IPv6AddressCount PKG=ec2
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2Instance_IPv6AddressCount'  -timeout 360m
=== RUN   TestAccEC2Instance_IPv6AddressCount
=== PAUSE TestAccEC2Instance_IPv6AddressCount
=== CONT  TestAccEC2Instance_IPv6AddressCount
--- PASS: TestAccEC2Instance_IPv6AddressCount (140.24s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	144.286s

Henry Finucane added 3 commits March 6, 2024 14:44
It looks like the ipv6 address list is strongly ordered in some ad-hoc
tests, so this is likely to be reasonably sane in behavior
It runs, but it requires that the host subnet have IPv6 CIDRs assigned.
@hfinucane hfinucane marked this pull request as draft March 11, 2024 22:23
Copy link

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 size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ec2 Issues and PRs that pertain to the ec2 service. labels Mar 11, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Mar 11, 2024
@hfinucane hfinucane marked this pull request as ready for review March 11, 2024 22:26
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @hfinucane 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Mar 12, 2024
@ewbankkit ewbankkit self-assigned this Mar 12, 2024
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Mar 12, 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=TestAccEC2Instance_IPv6\|TestAccEC2Instance_basic\|TestAccEC2Instance_ipv6AddressCountAndSingleAddressCausesError' 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=TestAccEC2Instance_IPv6\|TestAccEC2Instance_basic\|TestAccEC2Instance_ipv6AddressCountAndSingleAddressCausesError -timeout 360m
=== RUN   TestAccEC2Instance_basic
=== PAUSE TestAccEC2Instance_basic
=== RUN   TestAccEC2Instance_IPv6_supportAddressCount
=== PAUSE TestAccEC2Instance_IPv6_supportAddressCount
=== RUN   TestAccEC2Instance_ipv6AddressCountAndSingleAddressCausesError
=== PAUSE TestAccEC2Instance_ipv6AddressCountAndSingleAddressCausesError
=== RUN   TestAccEC2Instance_IPv6_supportAddressCountWithIPv4
=== PAUSE TestAccEC2Instance_IPv6_supportAddressCountWithIPv4
=== RUN   TestAccEC2Instance_IPv6AddressCount
=== PAUSE TestAccEC2Instance_IPv6AddressCount
=== RUN   TestAccEC2Instance_basicWithSpot
=== PAUSE TestAccEC2Instance_basicWithSpot
=== CONT  TestAccEC2Instance_basic
=== CONT  TestAccEC2Instance_basicWithSpot
=== CONT  TestAccEC2Instance_IPv6_supportAddressCountWithIPv4
--- PASS: TestAccEC2Instance_basic (121.12s)
=== CONT  TestAccEC2Instance_ipv6AddressCountAndSingleAddressCausesError
--- PASS: TestAccEC2Instance_ipv6AddressCountAndSingleAddressCausesError (5.32s)
=== CONT  TestAccEC2Instance_IPv6_supportAddressCount
--- PASS: TestAccEC2Instance_basicWithSpot (156.62s)
=== CONT  TestAccEC2Instance_IPv6AddressCount
--- PASS: TestAccEC2Instance_IPv6_supportAddressCountWithIPv4 (182.15s)
--- PASS: TestAccEC2Instance_IPv6_supportAddressCount (170.51s)
--- PASS: TestAccEC2Instance_IPv6AddressCount (178.74s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	355.332s

@ewbankkit
Copy link
Contributor

@hfinucane Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit f4bc32d into hashicorp:main Mar 12, 2024
36 checks passed
@github-actions github-actions bot added this to the v5.41.0 milestone Mar 12, 2024
@hfinucane hfinucane deleted the b-aws_ec2_instance-ipv6_address_count branch March 12, 2024 20:32
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Mar 14, 2024
Copy link

This functionality has been released in v5.41.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 Apr 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ec2 Issues and PRs that pertain to the ec2 service. size/M 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.

[Bug]: Adding ipv6_addresses or ipv6_address_count to aws_instance forces replacement
3 participants