Skip to content

Commit

Permalink
Update default value of purge_tags to True (ansible-collections#1343)
Browse files Browse the repository at this point in the history
Update default value of purge_tags to True

SUMMARY
Complete the deprecation cycle and update purge_tags default value to True
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
plugins/modules/acm_certificate.py
plugins/modules/cloudfront_distribution.py
plugins/modules/ec2_vpc_vpn.py
plugins/modules/kms_key.py
plugins/modules/rds_param_group.py
plugins/modules/route53_health_check.py
plugins/modules/route53_zone.py
plugins/modules/sqs_queue.py
ADDITIONAL INFORMATION

Reviewed-by: Markus Bergholz <[email protected]>
Reviewed-by: Alina Buzachis <None>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections@b56f3c6
  • Loading branch information
tremble authored and goneri committed Sep 21, 2022
1 parent aeb6af4 commit 6310b5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
12 changes: 2 additions & 10 deletions plugins/modules/route53_health_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.tags.deprecated_purge
- amazon.aws.tags
'''

EXAMPLES = '''
Expand Down Expand Up @@ -503,7 +503,7 @@ def main():
request_interval=dict(type='int', choices=[10, 30], default=30),
failure_threshold=dict(type='int', choices=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]),
tags=dict(type='dict', aliases=['resource_tags']),
purge_tags=dict(type='bool'),
purge_tags=dict(type='bool', default=True),
health_check_id=dict(type='str', aliases=['id'], required=False),
health_check_name=dict(type='str', aliases=['name'], required=False),
use_unique_names=dict(type='bool', required=False),
Expand Down Expand Up @@ -537,14 +537,6 @@ def main():
supports_check_mode=True,
)

if module.params.get('purge_tags') is None:
module.deprecate(
'The purge_tags parameter currently defaults to False.'
' For consistency across the collection, this default value'
' will change to True in release 5.0.0.',
version='5.0.0', collection_name='community.aws')
module.params['purge_tags'] = False

if not module.params.get('health_check_id') and not module.params.get('type'):
module.fail_json(msg="parameter 'type' is required if not updating or deleting health check by ID.")

Expand Down
12 changes: 2 additions & 10 deletions plugins/modules/route53_zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
extends_documentation_fragment:
- amazon.aws.aws
- amazon.aws.ec2
- amazon.aws.tags.deprecated_purge
- amazon.aws.tags
notes:
- Support for I(tags) and I(purge_tags) was added in release 2.1.0.
author:
Expand Down Expand Up @@ -437,7 +437,7 @@ def main():
hosted_zone_id=dict(),
delegation_set_id=dict(),
tags=dict(type='dict', aliases=['resource_tags']),
purge_tags=dict(type='bool'),
purge_tags=dict(type='bool', default=True),
)

mutually_exclusive = [
Expand All @@ -451,14 +451,6 @@ def main():
supports_check_mode=True,
)

if module.params.get('purge_tags') is None:
module.deprecate(
'The purge_tags parameter currently defaults to False.'
' For consistency across the collection, this default value'
' will change to True in release 5.0.0.',
version='5.0.0', collection_name='community.aws')
module.params['purge_tags'] = False

zone_in = module.params.get('zone').lower()
state = module.params.get('state').lower()
vpc_id = module.params.get('vpc_id')
Expand Down

0 comments on commit 6310b5d

Please sign in to comment.