Open robsonpiere opened 1 month ago
Voting for Prioritization
Volunteering to Work on This Issue
+1 this feature would be very useful for monitoring accounts set up per this doc https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html
Terraform Core Version
1.8.0
AWS Provider Version
5.54.1
Affected Resource(s)
aws_cloudwatch_query_definition
Expected Behavior
When trying to create or import an
aws_cloudwatch_query_definition
that references a log from another account, instead of the name of the log, the arn of the resource is used. This should work via aws-cli and the web console.Actual Behavior
when trying to create or import a resource where the log group name belongs to another account, the following error is displayed
The problem is the used validation, that does not accept arn format
https://github.com/hashicorp/terraform-provider-aws/blob/46b15e93e3c8c496d2454714d19ad1890a886eb4/internal/service/logs/query_definition.go#L54
https://github.com/hashicorp/terraform-provider-aws/blob/46b15e93e3c8c496d2454714d19ad1890a886eb4/internal/service/logs/validate.go#L25-L43
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Example Gist https://gist.github.com/robsonpiere/0340d506f63833491d68039679cc4a23
Steps to Reproduce
For import error
Try to import in terraform generating a tf.file
Output:
for create a new resource
same output error
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None