mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
@@ -41,6 +41,10 @@ options:
|
||||
vpc_id:
|
||||
description:
|
||||
- the vpc-id of a vpc to attach or detach
|
||||
asn:
|
||||
description:
|
||||
- the BGP ASN of the amazon side
|
||||
version_added: "2.6"
|
||||
wait_timeout:
|
||||
description:
|
||||
- number of seconds to wait for status during vpc attach and detach
|
||||
@@ -203,9 +207,11 @@ def detach_vgw(client, module, vpn_gateway_id, vpc_id=None):
|
||||
def create_vgw(client, module):
|
||||
params = dict()
|
||||
params['Type'] = module.params.get('type')
|
||||
if module.params.get('asn'):
|
||||
params['AmazonSideAsn'] = module.params.get('asn')
|
||||
|
||||
try:
|
||||
response = client.create_vpn_gateway(Type=params['Type'])
|
||||
response = client.create_vpn_gateway(**params)
|
||||
get_waiter(
|
||||
client, 'vpn_gateway_exists'
|
||||
).wait(
|
||||
@@ -528,6 +534,7 @@ def main():
|
||||
name=dict(),
|
||||
vpn_gateway_id=dict(),
|
||||
vpc_id=dict(),
|
||||
asn=dict(type='int'),
|
||||
wait_timeout=dict(type='int', default=320),
|
||||
type=dict(default='ipsec.1', choices=['ipsec.1']),
|
||||
tags=dict(default=None, required=False, type='dict', aliases=['resource_tags']),
|
||||
|
||||
Reference in New Issue
Block a user