-
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.
cloudwatchlogs_log_group_metric_filter: add support for unit and dime…
…nsions (#2286) SUMMARY This PR adds support for the options unit and dimensions in the cloudwatchlogs_log_group_metric_filter module. This enables configuring unit and dimensions in Cloudwatch Logs Metricfilters using ansible, which was previously not possible. The addition is pretty straigthforward since both unit and dimensions are part of the metric_transformation parameter. dimensions and default_value are mutually exclusive, however: The AWS API does not fail when both are present, instead the dimensions are simply ignored. Since they are not top-level parameters, the ansible module option mutually_exclusive was not possible. Instead a custom check was added to the module that throws an error when both parameters are present. An integration test has been added for this case, as well as for configuring metric_filters with units and/or dimensions. The function metricTransformationHandler has been rewritten slightly due to the addition of the two extra optional parameters, to make it a bit more readable. Happy to get your feedback! ISSUE TYPE Feature Pull Request COMPONENT NAME cloudwatchlogs_log_group_metric_filter ADDITIONAL INFORMATION Reviewed-by: GomathiselviS <[email protected]> Reviewed-by: Jasper Misset Reviewed-by: Alina Buzachis
- Loading branch information
1 parent
112615b
commit 118905b
Showing
3 changed files
with
154 additions
and
19 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
changelogs/fragments/20240906-cloudwatch-log-metric-filter-unit-dimensions.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 @@ | ||
--- | ||
minor_changes: | ||
- cloudwatchlogs_log_group_metric_filter - Add support for ``unit`` and ``dimensions`` options (https://github.com/ansible-collections/amazon.aws/pull/2286) |
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