Skip to content

Commit

Permalink
[promoted]Added support for 'vpc_endpoint_type'. (ansible-collections…
Browse files Browse the repository at this point in the history
…#460)

* Added support for 'vpc_endpoint_type'.
* Integration test for the 'vpc_endpoint_type' feature.
* Added choices in documentation.
* Added changelog.

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections@4da568a
  • Loading branch information
Proksima authored Mar 7, 2021
1 parent 20896f4 commit e1686e8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion plugins/modules/ec2_vpc_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
- Required when creating a VPC endpoint.
required: false
type: str
vpc_endpoint_type:
description:
- The type of endpoint.
required: false
default: Gateway
choices: [ "Interface", "Gateway", "GatewayLoadBalancer" ]
type: str
service:
description:
- An AWS supported vpc endpoint service. Use the M(community.aws.ec2_vpc_endpoint_info)
Expand Down Expand Up @@ -56,7 +63,7 @@
- absent to remove resource
required: false
default: present
choices: [ "present", "absent"]
choices: [ "present", "absent" ]
type: str
wait:
description:
Expand Down Expand Up @@ -251,6 +258,7 @@ def create_vpc_endpoint(client, module):
changed = False
token_provided = False
params['VpcId'] = module.params.get('vpc_id')
params['VpcEndpointType'] = module.params.get('vpc_endpoint_type')
params['ServiceName'] = module.params.get('service')
params['DryRun'] = module.check_mode

Expand Down Expand Up @@ -334,6 +342,7 @@ def setup_removal(client, module):
def main():
argument_spec = dict(
vpc_id=dict(),
vpc_endpoint_type=dict(default='Gateway', choices=['Interface', 'Gateway', 'GatewayLoadBalancer']),
service=dict(),
policy=dict(type='json'),
policy_file=dict(type='path', aliases=['policy_path']),
Expand Down

0 comments on commit e1686e8

Please sign in to comment.