From ce28beb32088073d26fb8756754cb287bc6d7bbe Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Fri, 12 Feb 2021 01:23:16 +0100 Subject: [PATCH] [promoted]ec2_vpc_endpoint - deprecate policy_file (#366) * deprecate policy_file * ignore file * changelog This commit was initially merged in https://github.com/ansible-collections/community.aws See: https://github.com/ansible-collections/community.aws/commit/820e5cd7ed4512556c6dbedb888b3907a66e955e --- plugins/modules/ec2_vpc_endpoint.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/modules/ec2_vpc_endpoint.py b/plugins/modules/ec2_vpc_endpoint.py index 4daaaeaa23e..8e2426a525a 100644 --- a/plugins/modules/ec2_vpc_endpoint.py +++ b/plugins/modules/ec2_vpc_endpoint.py @@ -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 @@ -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: