[Enhancement]: aws_cloudwatch_metric_alarm
: Add validation to prevent specifying both metric
and expression
#41680
Labels
enhancement
Requests to existing resources that expand the functionality or scope.
good first issue
Call to action for new contributors looking for a place to start. Smaller or straightforward issues.
service/cloudwatch
Issues and PRs that pertain to the cloudwatch service.
Terraform Core Version
1.9.6
AWS Provider Version
4.67.0
Affected Resource(s)
aws_cloudwatch_metric_alarm
->metric_query
Expected Behavior
metric_query
can only have ametric
block or anexpression
field but not both. This is not specified in the documentation and not caught withterraform plan
Actual Behavior
plan does not catch a badly configured resource.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
sample resource configuration -
Steps to Reproduce
run
terraform plan
for the above resourceDebug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: