Skip to content

Commit

Permalink
ec2_vpc_endpoint - deprecate policy_file (ansible-collections#366)
Browse files Browse the repository at this point in the history
* deprecate policy_file

* ignore file

* changelog
  • Loading branch information
tremble authored Feb 12, 2021
1 parent 064c508 commit da48dc4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ec2_vpc_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
on how to use it properly. Cannot be used with I(policy).
- Option when creating an endpoint. If not provided AWS will
utilise a default policy which provides full access to the service.
- This option has been deprecated and will be removed after 2022-12-01
to maintain the existing functionality please use the I(policy) option
and a file lookup.
required: false
aliases: [ "policy_path" ]
type: path
Expand Down Expand Up @@ -346,6 +349,11 @@ def main():
# Validate Requirements
state = module.params.get('state')

if module.params.get('policy_file'):
module.deprecate('The policy_file option has been deprecated and'
' will be removed after 2022-12-01',
date='2022-12-01', collection_name='community.aws')

try:
ec2 = module.client('ec2')
except (botocore.exceptions.ClientError, botocore.exceptions.BotoCoreError) as e:
Expand Down

0 comments on commit da48dc4

Please sign in to comment.