mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-07 11:20:28 -07:00
add vpntunnel resourcerefs
This commit is contained in:
parent
868982bd13
commit
a6107610d7
3 changed files with 13 additions and 8 deletions
|
@ -124,6 +124,10 @@ options:
|
||||||
next_hop_vpn_tunnel:
|
next_hop_vpn_tunnel:
|
||||||
description:
|
description:
|
||||||
- URL to a VpnTunnel that should handle matching packets.
|
- URL to a VpnTunnel that should handle matching packets.
|
||||||
|
- 'This field represents a link to a VpnTunnel resource in GCP. It can be specified
|
||||||
|
in two ways. First, you can place in the selfLink of the resource here as a
|
||||||
|
string Alternatively, you can add `register: name-of-resource` to a gcp_compute_vpn_tunnel
|
||||||
|
task and then set this next_hop_vpn_tunnel field to "{{ name-of-resource }}"'
|
||||||
required: false
|
required: false
|
||||||
extends_documentation_fragment: gcp
|
extends_documentation_fragment: gcp
|
||||||
notes:
|
notes:
|
||||||
|
@ -260,7 +264,7 @@ def main():
|
||||||
next_hop_gateway=dict(type='str'),
|
next_hop_gateway=dict(type='str'),
|
||||||
next_hop_instance=dict(type='dict'),
|
next_hop_instance=dict(type='dict'),
|
||||||
next_hop_ip=dict(type='str'),
|
next_hop_ip=dict(type='str'),
|
||||||
next_hop_vpn_tunnel=dict(type='dict'),
|
next_hop_vpn_tunnel=dict()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -321,7 +325,7 @@ def resource_to_request(module):
|
||||||
u'nextHopGateway': module.params.get('next_hop_gateway'),
|
u'nextHopGateway': module.params.get('next_hop_gateway'),
|
||||||
u'nextHopInstance': replace_resource_dict(module.params.get(u'next_hop_instance', {}), 'selfLink'),
|
u'nextHopInstance': replace_resource_dict(module.params.get(u'next_hop_instance', {}), 'selfLink'),
|
||||||
u'nextHopIp': module.params.get('next_hop_ip'),
|
u'nextHopIp': module.params.get('next_hop_ip'),
|
||||||
u'nextHopVpnTunnel': replace_resource_dict(module.params.get(u'next_hop_vpn_tunnel', {}), 'selfLink'),
|
u'nextHopVpnTunnel': replace_resource_dict(module.params.get(u'next_hop_vpn_tunnel', {}), 'selfLink')
|
||||||
}
|
}
|
||||||
return_vals = {}
|
return_vals = {}
|
||||||
for k, v in request.items():
|
for k, v in request.items():
|
||||||
|
@ -397,7 +401,7 @@ def response_to_hash(module, response):
|
||||||
u'nextHopInstance': replace_resource_dict(module.params.get(u'next_hop_instance', {}), 'selfLink'),
|
u'nextHopInstance': replace_resource_dict(module.params.get(u'next_hop_instance', {}), 'selfLink'),
|
||||||
u'nextHopIp': module.params.get('next_hop_ip'),
|
u'nextHopIp': module.params.get('next_hop_ip'),
|
||||||
u'nextHopVpnTunnel': replace_resource_dict(module.params.get(u'next_hop_vpn_tunnel', {}), 'selfLink'),
|
u'nextHopVpnTunnel': replace_resource_dict(module.params.get(u'next_hop_vpn_tunnel', {}), 'selfLink'),
|
||||||
u'nextHopNetwork': response.get(u'nextHopNetwork'),
|
u'nextHopNetwork': response.get(u'nextHopNetwork')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -142,12 +142,13 @@ network:
|
||||||
type: str
|
type: str
|
||||||
tunnels:
|
tunnels:
|
||||||
description:
|
description:
|
||||||
- A list of references to VpnTunnel resources associated to this VPN gateway.
|
- A list of references to VpnTunnel resources associated with this VPN gateway.
|
||||||
returned: success
|
returned: success
|
||||||
type: list
|
type: list
|
||||||
forwardingRules:
|
forwardingRules:
|
||||||
description:
|
description:
|
||||||
- A list of references to the ForwardingRule resources associated to this VPN gateway.
|
- A list of references to the ForwardingRule resources associated with this VPN
|
||||||
|
gateway.
|
||||||
returned: success
|
returned: success
|
||||||
type: list
|
type: list
|
||||||
region:
|
region:
|
||||||
|
|
|
@ -101,13 +101,13 @@ items:
|
||||||
type: str
|
type: str
|
||||||
tunnels:
|
tunnels:
|
||||||
description:
|
description:
|
||||||
- A list of references to VpnTunnel resources associated to this VPN gateway.
|
- A list of references to VpnTunnel resources associated with this VPN gateway.
|
||||||
returned: success
|
returned: success
|
||||||
type: list
|
type: list
|
||||||
forwardingRules:
|
forwardingRules:
|
||||||
description:
|
description:
|
||||||
- A list of references to the ForwardingRule resources associated to this VPN
|
- A list of references to the ForwardingRule resources associated with this
|
||||||
gateway.
|
VPN gateway.
|
||||||
returned: success
|
returned: success
|
||||||
type: list
|
type: list
|
||||||
region:
|
region:
|
||||||
|
|
Loading…
Add table
Reference in a new issue