-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
d/aws_ami: warn when most_recent is true and filters are missing #40211
Conversation
Community NoteVoting for Prioritization
For Submitters
|
87859bf
to
a5a1825
Compare
When `most_recent` is set to `true` and certain filtering criteria are missing, it's possible for this data source to return an image published by a third party. To bring visibility to this possibility in a non-breaking way, the provider will now append a warning diagnostic when an affected combination of arguments is detected. ```console % make testacc PKG=ec2 TESTS=TestAccEC2AMIDataSource_ make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.23.2 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccEC2AMIDataSource_' -timeout 360m --- PASS: TestAccEC2AMIDataSource_linuxInstance (11.17s) --- PASS: TestAccEC2AMIDataSource_localNameFilter (11.37s) --- PASS: TestAccEC2AMIDataSource_instanceStore (11.40s) --- PASS: TestAccEC2AMIDataSource_productCode (11.55s) --- PASS: TestAccEC2AMIDataSource_windowsInstance (12.23s) --- PASS: TestAccEC2AMIDataSource_gp3BlockDevice (111.44s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 116.580s ```
a5a1825
to
dbb33f7
Compare
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 🚀
This functionality has been released in v5.77.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
When
most_recent
is set totrue
and certain filtering criteria are missing, it's possible for this data source to return an image published by a third party. To bring visibility to this possibility in a non-breaking way, the provider will now append a warning diagnostic when an affected combination of arguments is detected.For practitioners, the resulting diagnostic will look similar to the following:
Relations
Closes #40197
Output from Acceptance Testing