parent
9d30434b6c
commit
90aa68be41
1 changed files with 8 additions and 1 deletions
|
@ -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']),
|
||||
|
|
Loading…
Reference in a new issue