Skip to content

Commit

Permalink
[promoted]ec2_vpc_endpoint - deprecate policy_file (ansible-collectio…
Browse files Browse the repository at this point in the history
…ns#366)

* deprecate policy_file

* ignore file

* changelog

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections@820e5cd
  • Loading branch information
tremble authored Feb 12, 2021
1 parent a971cd5 commit ce28beb
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 ce28beb

Please sign in to comment.