-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cloudwatch_metric_alarm: fix idempotency for alarm without dimensions (…
…#1865) SUMMARY A metric alarm in Cloudwatch can optionally have Dimensions. When a metric alarm in Cloudwatch does not have any dimensions, it returns: "Dimensions": [] when queried via boto3. When configuring a metric alarm without Dimensions in Cloudwatch using the cloudwatch_metric_alarm plugin, Dimensions must be absent from the parameters. Because "Dimensions": [] does not match Dimensions: None, the result is always Changed. This Pull Request fixes this by setting Dimensions from the returned alarm parameters to None when the field is empty. Fixes #1750 ISSUE TYPE Bugfix Pull Request COMPONENT NAME cloudwatch_metric_alarm ADDITIONAL INFORMATION Reviewed-by: GomathiselviS Reviewed-by: Jasper Misset Reviewed-by: Alina Buzachis Reviewed-by: Mark Chappell
- Loading branch information
1 parent
87f2342
commit 7aae9e7
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
changelogs/fragments/20240216-cloudwatch-metric-alarm-idempotency.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
bugfixes: | ||
- cloudwatch_metric_alarm - Fix idempotency when creating cloudwatch metric alarm without dimensions (https://github.com/ansible-collections/amazon.aws/pull/1865). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters