Feature request: check correct metric_name and Dimensions for aws_cloudwatch_metric_alarm based on referenced resource #881
RichardBradley
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I had a bug recently on my project where I was using the wrong Dimension for an alarm.
AWS have a lot of confusing Dimensions in CloudWatch, for example, error counts get emitted as one of the following
metric_name
:5XXError
" for V1 APIG5xx
" for V2 APIG5xxErrors
" for S35xxErrorRate
" for CloudfrontIt is very easy as a developer to get these mixed up, and (assuming
treat_missing_data = "notBreaching"
is set), there is no warning from AWS or Terraform if you do; the alarm simply does not work.I came here to see if
tflint
would detect this issue for me, but it seems that it does not yet. I think this might be useful for me and for other users oftflint
.The rule would have to detect the resource type of the target of the
aws_cloudwatch_metric_alarm
, then check themetric_name
anddimensions
against a known list of valid metrics.Thanks
Beta Was this translation helpful? Give feedback.
All reactions