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

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@820e5cd
  • Loading branch information
tremble authored and alinabuzachis committed Jul 20, 2021
1 parent 9270ea1 commit 26f6e44
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions plugins/modules/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 26f6e44

Please sign in to comment.