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: