mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 10:40:22 -07:00
[aws] Allow CloudWatch Log Group retention to be changed when log group exists (#43752)
* fix bugs #42028 and #43735
This commit is contained in:
parent
d7009abee4
commit
29f2bf651e
1 changed files with 8 additions and 0 deletions
|
@ -257,6 +257,14 @@ def main():
|
||||||
tags=module.params['tags'],
|
tags=module.params['tags'],
|
||||||
retention=module.params['retention'],
|
retention=module.params['retention'],
|
||||||
module=module)
|
module=module)
|
||||||
|
elif found_log_group:
|
||||||
|
if module.params['retention'] != found_log_group['retentionInDays']:
|
||||||
|
changed = True
|
||||||
|
input_retention_policy(client=logs,
|
||||||
|
log_group_name=module.params['log_group_name'],
|
||||||
|
retention=module.params['retention'],
|
||||||
|
module=module)
|
||||||
|
found_log_group['retentionInDays'] = module.params['retention']
|
||||||
|
|
||||||
module.exit_json(changed=changed, **camel_dict_to_snake_dict(found_log_group))
|
module.exit_json(changed=changed, **camel_dict_to_snake_dict(found_log_group))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue