-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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_ami: Support setting the imds_support attribute at creation time #27084
Conversation
Community NoteVoting for Prioritization
For Submitters
|
Thank you for your contribution! 🚀 Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the Additional details:
|
425bca3
to
9de0537
Compare
Now rebased on #27080 that handles bumping the go-aws-sdk version. |
One CI check is failing due to #27089 but the rest looks good to me, I'll switch the PR to 'ready for review'. |
5cdd266
to
67d98b6
Compare
Now rebased on latest |
There was a problem hiding this 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=TestAccEC2AMIDataSource_natInstance\|TestAccEC2AMI_imdsSupport\|TestAccEC2AMI_basic' 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=TestAccEC2AMIDataSource_natInstance\|TestAccEC2AMI_imdsSupport\|TestAccEC2AMI_basic -timeout 180m
=== RUN TestAccEC2AMIDataSource_natInstance
=== PAUSE TestAccEC2AMIDataSource_natInstance
=== RUN TestAccEC2AMI_basic
=== PAUSE TestAccEC2AMI_basic
=== RUN TestAccEC2AMI_imdsSupport
=== PAUSE TestAccEC2AMI_imdsSupport
=== CONT TestAccEC2AMIDataSource_natInstance
=== CONT TestAccEC2AMI_imdsSupport
=== CONT TestAccEC2AMI_basic
--- PASS: TestAccEC2AMIDataSource_natInstance (34.96s)
--- PASS: TestAccEC2AMI_imdsSupport (75.04s)
--- PASS: TestAccEC2AMI_basic (75.60s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 82.310s
@christophetd Thanks for the contribution 🎉 👏. |
Appreciate the quick turnaround! When's the next release planned for? |
This functionality has been released in v4.34.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! |
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. |
Description
This pull request adds support for setting the
imds_support
attribute when creatingaws_ami
resources. It also adds support for this attribute in theaws_ami
data source.Note: Setting this attribute is currently only supported in the AWS API at registration time (i.e.
ec2:RegisterImage
). It is not available inec2:ModifyImageAttributes
.Relations
closes #27083
References
https://aws.amazon.com/about-aws/whats-new/2022/10/amazon-machine-images-support-instance-metadata-service-version-2-default/
Output from Acceptance Testing
Note: Due to #27049, I had to use Terraform v1.2.9 to run acceptance tests (did not work with v1.3.1)