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_instance: add support for http_protocol_ipv6 to metadata_options #32759

Merged

Conversation

kadrach
Copy link
Contributor

@kadrach kadrach commented Jul 31, 2023

Description

Adds support for enabling instance metadata IPv6 endpoint (e.g. for use in IPv6-only instances).

resource "aws_instance" "this" {
  // ...

  metadata_options {
    http_protocol_ipv6 = "enabled"
  }
}

Relations

Closes #22332.
Relates #20796.

References

https://aws.amazon.com/blogs/networking-and-content-delivery/introducing-ipv6-only-subnets-and-ec2-instances/

Output from Acceptance Testing

% make testacc AWS_DEFAULT_REGION=us-east-1 PKG=ec2 TESTS='TestAccEC2Instance_metadataOptions'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2Instance_metadataOptions'  -timeout 180m
=== RUN   TestAccEC2Instance_metadataOptions
=== PAUSE TestAccEC2Instance_metadataOptions
=== CONT  TestAccEC2Instance_metadataOptions
--- PASS: TestAccEC2Instance_metadataOptions (290.94s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        293.760s

@github-actions
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 tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ec2 Issues and PRs that pertain to the ec2 service. size/XS Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. and removed tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ec2 Issues and PRs that pertain to the ec2 service. labels Jul 31, 2023
@kadrach kadrach force-pushed the f-metadata-options-support-ipv6-22332 branch from b04f227 to 9d83daa Compare July 31, 2023 01:38
@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ec2 Issues and PRs that pertain to the ec2 service. and removed tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ec2 Issues and PRs that pertain to the ec2 service. labels Jul 31, 2023
@kadrach kadrach force-pushed the f-metadata-options-support-ipv6-22332 branch from 9d83daa to a80b0de Compare July 31, 2023 01:46
@kadrach kadrach marked this pull request as ready for review July 31, 2023 02:35
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 31, 2023
@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. labels Aug 7, 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=TestAccEC2InstanceDataSource_metadataOptions\|TestAccEC2InstanceDataSource_basic\|TestAccEC2Instance_basic\|TestAccEC2Instance_metadataOptions' PKG=ec2 ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 2  -run=TestAccEC2InstanceDataSource_metadataOptions\|TestAccEC2InstanceDataSource_basic\|TestAccEC2Instance_basic\|TestAccEC2Instance_metadataOptions -timeout 180m
=== RUN   TestAccEC2InstanceDataSource_basic
=== PAUSE TestAccEC2InstanceDataSource_basic
=== RUN   TestAccEC2InstanceDataSource_metadataOptions
=== PAUSE TestAccEC2InstanceDataSource_metadataOptions
=== RUN   TestAccEC2Instance_basic
=== PAUSE TestAccEC2Instance_basic
=== RUN   TestAccEC2Instance_metadataOptions
=== PAUSE TestAccEC2Instance_metadataOptions
=== RUN   TestAccEC2Instance_basicWithSpot
=== PAUSE TestAccEC2Instance_basicWithSpot
=== CONT  TestAccEC2InstanceDataSource_basic
=== CONT  TestAccEC2Instance_metadataOptions
--- PASS: TestAccEC2InstanceDataSource_basic (120.93s)
=== CONT  TestAccEC2Instance_basic
--- PASS: TestAccEC2Instance_basic (132.21s)
=== CONT  TestAccEC2Instance_basicWithSpot
--- PASS: TestAccEC2Instance_metadataOptions (277.08s)
=== CONT  TestAccEC2InstanceDataSource_metadataOptions
--- PASS: TestAccEC2Instance_basicWithSpot (131.69s)
--- PASS: TestAccEC2InstanceDataSource_metadataOptions (144.97s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ec2	427.455s

@ewbankkit
Copy link
Contributor

@kadrach Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit d820b0f into hashicorp:main Aug 7, 2023
41 checks passed
@github-actions github-actions bot added this to the v5.12.0 milestone Aug 7, 2023
@github-actions
Copy link

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

@kadrach kadrach deleted the f-metadata-options-support-ipv6-22332 branch August 10, 2023 22:48
@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 Sep 10, 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/ec2 Issues and PRs that pertain to the ec2 service. size/XS 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.

r/aws_instance.metadata_options should support http_protocol_ipv6 in order to enable IPv6 IMDS
3 participants