mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
parent
9d30434b6c
commit
90aa68be41
1 changed files with 8 additions and 1 deletions
|
@ -41,6 +41,10 @@ options:
|
||||||
vpc_id:
|
vpc_id:
|
||||||
description:
|
description:
|
||||||
- the vpc-id of a vpc to attach or detach
|
- 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:
|
wait_timeout:
|
||||||
description:
|
description:
|
||||||
- number of seconds to wait for status during vpc attach and detach
|
- 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):
|
def create_vgw(client, module):
|
||||||
params = dict()
|
params = dict()
|
||||||
params['Type'] = module.params.get('type')
|
params['Type'] = module.params.get('type')
|
||||||
|
if module.params.get('asn'):
|
||||||
|
params['AmazonSideAsn'] = module.params.get('asn')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
response = client.create_vpn_gateway(Type=params['Type'])
|
response = client.create_vpn_gateway(**params)
|
||||||
get_waiter(
|
get_waiter(
|
||||||
client, 'vpn_gateway_exists'
|
client, 'vpn_gateway_exists'
|
||||||
).wait(
|
).wait(
|
||||||
|
@ -528,6 +534,7 @@ def main():
|
||||||
name=dict(),
|
name=dict(),
|
||||||
vpn_gateway_id=dict(),
|
vpn_gateway_id=dict(),
|
||||||
vpc_id=dict(),
|
vpc_id=dict(),
|
||||||
|
asn=dict(type='int'),
|
||||||
wait_timeout=dict(type='int', default=320),
|
wait_timeout=dict(type='int', default=320),
|
||||||
type=dict(default='ipsec.1', choices=['ipsec.1']),
|
type=dict(default='ipsec.1', choices=['ipsec.1']),
|
||||||
tags=dict(default=None, required=False, type='dict', aliases=['resource_tags']),
|
tags=dict(default=None, required=False, type='dict', aliases=['resource_tags']),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue