-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cloudwatchlogs_log_group_metric_filter: add support for unit and dimensions #2286
cloudwatchlogs_log_group_metric_filter: add support for unit and dimensions #2286
Conversation
Docs Build 📝Thank you for contribution!✨ This PR has been merged and your docs changes will be incorporated when they are next published. |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 49s |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 29s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this PR. Please update the Return
block of the module documentation with the new parameters.
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 26s |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 41s |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 5m 24s |
@jmisset-cb Can you please rebase this branch? |
abc75bc
to
8f52905
Compare
@alinabuzachis Done! |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 11s |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 5m 10s |
Build succeeded (gate pipeline). ✔️ ansible-galaxy-importer SUCCESS in 5m 21s |
118905b
into
ansible-collections:main
Backport to stable-8: 💚 backport PR created✅ Backport PR branch: Backported as #2361 🤖 @patchback |
…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 (cherry picked from commit 118905b)
…nsions (#2286) (#2361) This is a backport of PR #2286 as merged into main (118905b). 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: Alina Buzachis
SUMMARY
This PR adds support for the options
unit
anddimensions
in thecloudwatchlogs_log_group_metric_filter
module.This enables configuring
unit
anddimensions
in Cloudwatch Logs Metricfilters using ansible, which was previously not possible.The addition is pretty straigthforward since both
unit
anddimensions
are part of themetric_transformation
parameter.dimensions
anddefault_value
are mutually exclusive, however: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
COMPONENT NAME
cloudwatchlogs_log_group_metric_filter
ADDITIONAL INFORMATION