You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running CloudWatch metric alarm playbooks, existing alarms without dimensions report 'changed' even when no changes have been made to the alarm settings/props.
After debugging the cloudwatch_metric_alarm module code, looks like there is an issue with the Dimensions field.
If the alarm does not contain dimenions, it returns "Dimensions": [] to the module.
If dimensions is not present in the task, it is absent from the parameters. This causes the comparison in the module to return Changed.
Hi @KamilBlaz, is this something you are still planning on picking up?
I'm asking because I have also looked into this issue and found a possible solution.
Summary
When running CloudWatch metric alarm playbooks, existing alarms without dimensions report 'changed' even when no changes have been made to the alarm settings/props.
After debugging the cloudwatch_metric_alarm module code, looks like there is an issue with the Dimensions field.
If the alarm does not contain dimenions, it returns "Dimensions": [] to the module.
If dimensions is not present in the task, it is absent from the parameters. This causes the comparison in the module to return Changed.
Issue Type
Bug Report
Component Name
cloudwatch_metric_alarm
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
No response
Steps to Reproduce
If you uncomment the dimensions and the key/value pair it contains, and run it more than once, it does not return Changed.
Expected Results
After the initial run of above playbook, future runs should report no changes (changed=0) unless settings/props are modified.
Actual Results
After initial playbook run, future playbook runs always report that changes are necessary and makes AWS call to create alarm again.
Code of Conduct
The text was updated successfully, but these errors were encountered: