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_ec2_instance: Support modifying an ec2 instance's IPv6 addresses in-place #37262

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hfinucane
Copy link

Description

This allows you to set specific IPv6 addresses on an EC2 instance, without triggering an instance replacement.

This also switches to using a set for aws_instance.ipv6_addresses, on the grounds that AWS treats it as a set. I'm a little nervous about this, although it seems to go fine in practice.

Output from Acceptance Testing

#> make testacc TESTARGS='-run=TestAccEC2Instance_IPv6\|TestAccEC2Instance_basic\|TestAccEC2Instance_ipv6AddressCountAndSingleAddressCausesError\|TestAccEC2Instance_IPv6_supportIPv6Addresses' PKG=ec2 ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.2 test ./internal/service/ec2/... -v -count 1 -parallel 3  -run=TestAccEC2Instance_IPv6\|TestAccEC2Instance_basic\|TestAccEC2Instance_ipv6AddressCountAndSingleAddressCausesError\|TestAccEC2Instance_IPv6_supportIPv6Addresses -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_IPv6_supportIPv6Addresses
=== PAUSE TestAccEC2Instance_IPv6_supportIPv6Addresses
=== RUN   TestAccEC2Instance_IPv6AddressCount
=== PAUSE TestAccEC2Instance_IPv6AddressCount
=== RUN   TestAccEC2Instance_basicWithSpot
=== PAUSE TestAccEC2Instance_basicWithSpot
=== CONT  TestAccEC2Instance_basic
=== CONT  TestAccEC2Instance_IPv6_supportIPv6Addresses
=== CONT  TestAccEC2Instance_basicWithSpot
--- PASS: TestAccEC2Instance_basic (183.68s)
=== CONT  TestAccEC2Instance_IPv6AddressCount
--- PASS: TestAccEC2Instance_IPv6_supportIPv6Addresses (313.23s)
=== CONT  TestAccEC2Instance_ipv6AddressCountAndSingleAddressCausesError
--- PASS: TestAccEC2Instance_ipv6AddressCountAndSingleAddressCausesError (4.42s)
=== CONT  TestAccEC2Instance_IPv6_supportAddressCountWithIPv4
--- PASS: TestAccEC2Instance_IPv6AddressCount (228.67s)
=== CONT  TestAccEC2Instance_IPv6_supportAddressCount
--- PASS: TestAccEC2Instance_basicWithSpot (426.71s)
--- PASS: TestAccEC2Instance_IPv6_supportAddressCountWithIPv4 (178.24s)
--- PASS: TestAccEC2Instance_IPv6_supportAddressCount (165.86s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	584.663s
...

Copy link

github-actions bot commented May 3, 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 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 May 3, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label May 3, 2024
@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels May 6, 2024
@hfinucane
Copy link
Author

hfinucane commented May 17, 2024

Can I rerun the checks? The failing ones all look like github actions getting ratelimited by dockerhub

(yes, rebased & re-pushed)

Henry Finucane added 3 commits May 23, 2024 12:08
Switches to using a set for ipv6 addresses, on the grounds that AWS treats it as a set
@hfinucane hfinucane force-pushed the b-aws_ec2_instance-ipv6_addresses branch from 321e87f to 33a41f9 Compare May 23, 2024 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

None yet

2 participants