-
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_subnet: use Tags
field from DescribeSubnets
response
#40144
Conversation
Community NoteVoting for Prioritization
For Submitters
|
This change modifies the transparent tagging configuration for this data source to use the `Tags` field from the `DescribeSubnets` response, rather than making an additional call to the `DescribeTags` API. As a side effect, this data source will no longer require the calling principal to have the `ec2:DescribeTags` IAM permission, fixing a regression introduced in `v5.73.0`. ```console % make testacc PKG=ec2 TESTS=TestAccVPCSubnetDataSource_ 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='TestAccVPCSubnetDataSource_' -timeout 360m 2024/11/15 10:06:55 Initializing Terraform AWS Provider... === NAME TestAccVPCSubnetDataSource_enableLniAtDeviceIndex vpc_subnet_data_source_test.go:197: skipping since no Outposts found --- SKIP: TestAccVPCSubnetDataSource_enableLniAtDeviceIndex (0.79s) --- PASS: TestAccVPCSubnetDataSource_tags_EmptyMap (19.23s) --- PASS: TestAccVPCSubnetDataSource_tags (19.64s) --- PASS: TestAccVPCSubnetDataSource_tags_NullMap (19.64s) --- PASS: TestAccVPCSubnetDataSource_tags_IgnoreTags_Overlap_DefaultTag (19.73s) --- PASS: TestAccVPCSubnetDataSource_tags_DefaultTags_nonOverlapping (19.74s) --- PASS: TestAccVPCSubnetDataSource_basic (20.45s) --- PASS: TestAccVPCSubnetDataSource_tags_IgnoreTags_Overlap_ResourceTag (20.92s) --- PASS: TestAccVPCSubnetDataSource_ipv6ByIPv6CIDRBlock (36.98s) --- PASS: TestAccVPCSubnetDataSource_ipv6ByIPv6Filter (37.00s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 42.238s ```
f23f853
to
e5db616
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
This change modifies the transparent tagging configuration for this data source to use the
Tags
field from theDescribeSubnets
response, rather than making an additional call to theDescribeTags
API. As a side effect, this data source will no longer require the calling principal to have theec2:DescribeTags
IAM permission, fixing a regression introduced inv5.73.0
.As additional confirmation that this change no longer results in calls to the
DescribeTags
API I created a simple configuration with the following subnet data source.After the initial infrastructure is provisioned, this data source is read on every plan operation. By searching the debug logs for a plan operation with
v5.76.0
(latest release) and a build from this release branch, it can be confirmed that the data source is no longer making the additional API call.v5.76.0
:This branch:
Relations
Closes #40104
Output from Acceptance Testing