-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Fix: add ARN support in log_group_names for aws_cloudwatch_query_definition #43183
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
Fix: add ARN support in log_group_names for aws_cloudwatch_query_definition #43183
Conversation
Community GuidelinesThis comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Pull Request Authors
|
✅ Thank you for correcting the previously detected issues! The maintainers appreciate your efforts to make the review process as smooth as possible. |
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=TestAccLogsQueryDefinition_' PKG=logs ACCTEST_PARALLELISM=3
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.24.4 test ./internal/service/logs/... -v -count 1 -parallel 3 -run=TestAccLogsQueryDefinition_ -timeout 360m -vet=off
2025/06/29 17:05:32 Creating Terraform AWS Provider (SDKv2-style)...
2025/06/29 17:05:32 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN TestAccLogsQueryDefinition_basic
=== PAUSE TestAccLogsQueryDefinition_basic
=== RUN TestAccLogsQueryDefinition_disappears
=== PAUSE TestAccLogsQueryDefinition_disappears
=== RUN TestAccLogsQueryDefinition_rename
=== PAUSE TestAccLogsQueryDefinition_rename
=== RUN TestAccLogsQueryDefinition_logGroups
=== PAUSE TestAccLogsQueryDefinition_logGroups
=== RUN TestAccLogsQueryDefinition_logGroupARNs
=== PAUSE TestAccLogsQueryDefinition_logGroupARNs
=== CONT TestAccLogsQueryDefinition_basic
=== CONT TestAccLogsQueryDefinition_logGroups
=== CONT TestAccLogsQueryDefinition_logGroupARNs
--- PASS: TestAccLogsQueryDefinition_basic (13.86s)
=== CONT TestAccLogsQueryDefinition_rename
--- PASS: TestAccLogsQueryDefinition_logGroupARNs (14.53s)
=== CONT TestAccLogsQueryDefinition_disappears
--- PASS: TestAccLogsQueryDefinition_logGroups (23.43s)
--- PASS: TestAccLogsQueryDefinition_disappears (11.04s)
--- PASS: TestAccLogsQueryDefinition_rename (21.18s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/logs 40.152s
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 🚀
@robsonpiere Thanks for the contribution 🎉 👏. |
Warning This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
This functionality has been released in v6.2.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. |
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the library.
Changes to Security Controls
N/A
Description
This pull request enhances the
aws_cloudwatch_query_definition
resource by adding support for specifying log group ARNs in addition to log group names. It also introduces a new acceptance test to validate this functionality.Enhancements to
aws_cloudwatch_query_definition
resource:log_group_names
schema to allow validation of both log group names and ARNs usingvalidation.Any
. This ensures compatibility with ARNs while maintaining support for log group names. (internal/service/logs/query_definition.go
, internal/service/logs/query_definition.goL55-R58)Testing improvements:
TestAccLogsQueryDefinition_logGroupARNs
, to verify the functionality of using log group ARNs in thelog_group_names
attribute. This test includes resource creation, attribute checks, and import state verification. (internal/service/logs/query_definition_test.go
, internal/service/logs/query_definition_test.goR179-R210)testAccQueryDefinitionConfig_logGroupARNs
, to generate test configurations for log group ARNs. This function creates multiple log groups and references their ARNs in the query definition. (internal/service/logs/query_definition_test.go
, internal/service/logs/query_definition_test.goR293-R317)Relations
Closes #37986
References
Output from Acceptance Testing