Update azure_rm_virtualnetwork related document (#59023)
* Update azure_rm_virtualnetwork related documentation
This commit is contained in:
parent
b376c91749
commit
65e0f37fc0
3 changed files with 150 additions and 74 deletions
|
@ -18,51 +18,49 @@ DOCUMENTATION = '''
|
||||||
---
|
---
|
||||||
module: azure_rm_virtualnetwork
|
module: azure_rm_virtualnetwork
|
||||||
version_added: "2.1"
|
version_added: "2.1"
|
||||||
short_description: Manage Azure virtual networks.
|
short_description: Manage Azure virtual networks
|
||||||
description:
|
description:
|
||||||
- Create, update or delete a virtual networks. Allows setting and updating the available IPv4 address ranges
|
- Create, update or delete a virtual networks. Allows setting and updating the available IPv4 address ranges
|
||||||
and setting custom DNS servers. Use the azure_rm_subnet module to associate subnets with a virtual network.
|
and setting custom DNS servers. Use the M(azure_rm_subnet) module to associate subnets with a virtual network.
|
||||||
options:
|
options:
|
||||||
resource_group:
|
resource_group:
|
||||||
description:
|
description:
|
||||||
- name of resource group.
|
- Name of resource group.
|
||||||
required: true
|
required: true
|
||||||
address_prefixes_cidr:
|
address_prefixes_cidr:
|
||||||
description:
|
description:
|
||||||
- List of IPv4 address ranges where each is formatted using CIDR notation. Required when creating
|
- List of IPv4 address ranges where each is formatted using CIDR notation.
|
||||||
a new virtual network or using purge_address_prefixes.
|
- Required when creating a new virtual network or using I(purge_address_prefixes).
|
||||||
aliases:
|
aliases:
|
||||||
- address_prefixes
|
- address_prefixes
|
||||||
dns_servers:
|
dns_servers:
|
||||||
description:
|
description:
|
||||||
- Custom list of DNS servers. Maximum length of two. The first server in the list will be treated
|
- Custom list of DNS servers. Maximum length of two.
|
||||||
as the Primary server. This is an explicit list. Existing DNS servers will be replaced with the
|
- The first server in the list will be treated as the Primary server. This is an explicit list.
|
||||||
specified list. Use the purge_dns_servers option to remove all custom DNS servers and revert to
|
- Existing DNS servers will be replaced with the specified list.
|
||||||
default Azure servers.
|
- Use the I(purge_dns_servers) option to remove all custom DNS servers and revert to default Azure servers.
|
||||||
location:
|
location:
|
||||||
description:
|
description:
|
||||||
- Valid azure location. Defaults to location of the resource group.
|
- Valid Azure location. Defaults to location of the resource group.
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- name of the virtual network.
|
- Name of the virtual network.
|
||||||
required: true
|
required: true
|
||||||
purge_address_prefixes:
|
purge_address_prefixes:
|
||||||
description:
|
description:
|
||||||
- Use with state present to remove any existing address_prefixes.
|
- Use with I(state=present) to remove any existing I(address_prefixes).
|
||||||
type: bool
|
type: bool
|
||||||
default: 'no'
|
default: 'no'
|
||||||
aliases:
|
aliases:
|
||||||
- purge
|
- purge
|
||||||
purge_dns_servers:
|
purge_dns_servers:
|
||||||
description:
|
description:
|
||||||
- Use with state present to remove existing DNS servers, reverting to default Azure servers. Mutually
|
- Use with I(state=present) to remove existing DNS servers, reverting to default Azure servers. Mutually exclusive with DNS servers.
|
||||||
exclusive with dns_servers.
|
|
||||||
type: bool
|
type: bool
|
||||||
default: 'no'
|
default: 'no'
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Assert the state of the virtual network. Use C(present) to create or update and
|
- State of the virtual network. Use C(present) to create or update and C(absent) to delete.
|
||||||
C(absent) to delete.
|
|
||||||
default: present
|
default: present
|
||||||
choices:
|
choices:
|
||||||
- absent
|
- absent
|
||||||
|
@ -73,8 +71,8 @@ extends_documentation_fragment:
|
||||||
- azure_tags
|
- azure_tags
|
||||||
|
|
||||||
author:
|
author:
|
||||||
- "Chris Houseknecht (@chouseknecht)"
|
- Chris Houseknecht (@chouseknecht)
|
||||||
- "Matt Davis (@nitzmahone)"
|
- Matt Davis (@nitzmahone)
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -101,26 +99,72 @@ EXAMPLES = '''
|
||||||
'''
|
'''
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
state:
|
state:
|
||||||
description: Current state of the virtual network.
|
description:
|
||||||
|
- Current state of the virtual network.
|
||||||
returned: always
|
returned: always
|
||||||
type: dict
|
type: complex
|
||||||
sample: {
|
contains:
|
||||||
"address_prefixes": [
|
address_prefixes:
|
||||||
|
description:
|
||||||
|
- The virtual network IPv4 address ranges.
|
||||||
|
returned: always
|
||||||
|
type: list
|
||||||
|
sample: [
|
||||||
"10.1.0.0/16",
|
"10.1.0.0/16",
|
||||||
"172.100.0.0/16"
|
"172.100.0.0/16"
|
||||||
],
|
]
|
||||||
"dns_servers": [
|
dns_servers:
|
||||||
|
description:
|
||||||
|
- DNS servers.
|
||||||
|
returned: always
|
||||||
|
type: list
|
||||||
|
sample: [
|
||||||
"127.0.0.1",
|
"127.0.0.1",
|
||||||
"127.0.0.3"
|
"127.0.0.3"
|
||||||
],
|
]
|
||||||
"etag": 'W/"0712e87c-f02f-4bb3-8b9e-2da0390a3886"',
|
etag:
|
||||||
"id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroup/myResourceGroup/providers/Microsoft.Network/virtualNetworks/myVirtualNetwork",
|
description:
|
||||||
"location": "eastus",
|
- A unique read-only string that changes whenever the resource is update.
|
||||||
"name": "my_test_network",
|
returned: always
|
||||||
"provisioning_state": "Succeeded",
|
type: str
|
||||||
"tags": null,
|
sample: 'W/"0712e87c-f02f-4bb3-8b9e-2da0390a3886"'
|
||||||
"type": "Microsoft.Network/virtualNetworks"
|
id:
|
||||||
}
|
description:
|
||||||
|
- Resource ID.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
|
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroup/myResourceGroup/providers/
|
||||||
|
Microsoft.Network/virtualNetworks/myVirtualNetwork"
|
||||||
|
location:
|
||||||
|
description:
|
||||||
|
- The Geo-location where the resource lives.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
|
sample: eastus
|
||||||
|
name:
|
||||||
|
description:
|
||||||
|
- Resource name.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
|
sample: my_test_network
|
||||||
|
provisioning_state:
|
||||||
|
description:
|
||||||
|
- Provisioning state of the virtual network.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
|
sample: Succeeded
|
||||||
|
tags:
|
||||||
|
description:
|
||||||
|
- Resource tags, such as { 'tags1':'value1' }
|
||||||
|
returned: always
|
||||||
|
type: dict
|
||||||
|
sample: { 'key1':'value1' }
|
||||||
|
type:
|
||||||
|
descriptioin:
|
||||||
|
- Resource type.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
|
sample: Microsoft.Network/virtualNetworks
|
||||||
'''
|
'''
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -20,7 +20,7 @@ module: azure_rm_virtualnetwork_facts
|
||||||
|
|
||||||
version_added: "2.1"
|
version_added: "2.1"
|
||||||
|
|
||||||
short_description: Get virtual network facts.
|
short_description: Get virtual network facts
|
||||||
|
|
||||||
description:
|
description:
|
||||||
- Get facts for a specific virtual network or all virtual networks within a resource group.
|
- Get facts for a specific virtual network or all virtual networks within a resource group.
|
||||||
|
@ -40,8 +40,8 @@ extends_documentation_fragment:
|
||||||
- azure
|
- azure
|
||||||
|
|
||||||
author:
|
author:
|
||||||
- "Chris Houseknecht (@chouseknecht) <house@redhat.com>"
|
- Chris Houseknecht (@chouseknecht)
|
||||||
- "Matt Davis (@nitzmahone) <mdavis@redhat.com>"
|
- Matt Davis (@nitzmahone)
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -62,7 +62,8 @@ EXAMPLES = '''
|
||||||
'''
|
'''
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
azure_virtualnetworks:
|
azure_virtualnetworks:
|
||||||
description: List of virtual network dicts.
|
description:
|
||||||
|
- List of virtual network dicts.
|
||||||
returned: always
|
returned: always
|
||||||
type: list
|
type: list
|
||||||
example: [{
|
example: [{
|
||||||
|
@ -83,78 +84,110 @@ azure_virtualnetworks:
|
||||||
"type": "Microsoft.Network/virtualNetworks"
|
"type": "Microsoft.Network/virtualNetworks"
|
||||||
}]
|
}]
|
||||||
virtualnetworks:
|
virtualnetworks:
|
||||||
description: List of virtual network dicts with same format as azure_rm_virtualnetwork module parameters.
|
description:
|
||||||
|
- List of virtual network dicts with same format as M(azure_rm_virtualnetwork) module parameters.
|
||||||
returned: always
|
returned: always
|
||||||
type: list
|
type: complex
|
||||||
contains:
|
contains:
|
||||||
id:
|
id:
|
||||||
description:
|
description:
|
||||||
- Resource ID.
|
- Resource ID of the virtual network.
|
||||||
sample: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet2001
|
sample: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworks/vnet2001
|
||||||
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
address_prefixes:
|
address_prefixes:
|
||||||
description:
|
description:
|
||||||
- List of IPv4 address ranges where each is formatted using CIDR notation.
|
- List of IPv4 address ranges where each is formatted using CIDR notation.
|
||||||
sample: ["10.10.0.0/16"]
|
sample: ["10.10.0.0/16"]
|
||||||
|
returned: always
|
||||||
type: list
|
type: list
|
||||||
dns_servers:
|
dns_servers:
|
||||||
description:
|
description:
|
||||||
- Custom list of DNS servers.
|
- Custom list of DNS servers.
|
||||||
|
returned: always
|
||||||
type: list
|
type: list
|
||||||
sample: ["www.azure.com"]
|
sample: ["www.azure.com"]
|
||||||
location:
|
location:
|
||||||
description:
|
description:
|
||||||
- Valid azure location.
|
- Valid Azure location.
|
||||||
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
sample: eastus
|
sample: eastus
|
||||||
tags:
|
tags:
|
||||||
description:
|
description:
|
||||||
- Tags assigned to the resource. Dictionary of string:string pairs.
|
- Tags assigned to the resource. Dictionary of string:string pairs.
|
||||||
|
returned: always
|
||||||
type: dict
|
type: dict
|
||||||
sample: { "tag1": "abc" }
|
sample: { "tag1": "abc" }
|
||||||
provisioning_state:
|
provisioning_state:
|
||||||
description:
|
description:
|
||||||
- Provisioning state of the resource.
|
- Provisioning state of the resource.
|
||||||
sample: Successed
|
returned: always
|
||||||
|
sample: Succeeded
|
||||||
type: str
|
type: str
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- name of the virtual network.
|
- Name of the virtual network.
|
||||||
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
sample: foo
|
sample: foo
|
||||||
subnets:
|
subnets:
|
||||||
description:
|
description:
|
||||||
- Subnets associate to this virtual network.
|
- Subnets associated with the virtual network.
|
||||||
|
returned: always
|
||||||
type: list
|
type: list
|
||||||
contains:
|
contains:
|
||||||
id:
|
id:
|
||||||
description:
|
description:
|
||||||
- Resource ID.
|
- Resource ID of the subnet.
|
||||||
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
|
sample: "/subscriptions/f64d4ee8-be94-457d-ba26-3fa6b6506cef/resourceGroups/v-xisuRG/providers/
|
||||||
|
Microsoft.Network/virtualNetworks/vnetb57dc95232/subnets/vnetb57dc95232"
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Resource Name.
|
- Name of the subnet.
|
||||||
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
|
sample: vnetb57dc95232
|
||||||
provisioning_state:
|
provisioning_state:
|
||||||
description:
|
description:
|
||||||
- provision state of the Resource.
|
- Provisioning state of the subnet.
|
||||||
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
sample: Successed
|
sample: Succeeded
|
||||||
address_prefix:
|
address_prefix:
|
||||||
description:
|
description:
|
||||||
- The address prefix for the subnet.
|
- The address prefix for the subnet.
|
||||||
|
returned: always
|
||||||
|
type: str
|
||||||
|
sample: '10.1.0.0/16'
|
||||||
network_security_group:
|
network_security_group:
|
||||||
description:
|
description:
|
||||||
- Existing security group id with which to associate the subnet.
|
- Existing security group ID with which to associate the subnet.
|
||||||
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
|
sample: null
|
||||||
route_table:
|
route_table:
|
||||||
description:
|
description:
|
||||||
- The reference of the RouteTable resource.
|
- The reference of the RouteTable resource.
|
||||||
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
|
sample: null
|
||||||
service_endpoints:
|
service_endpoints:
|
||||||
description:
|
description:
|
||||||
- An array of service endpoints.
|
- An array of service endpoints.
|
||||||
|
returned: always
|
||||||
type: list
|
type: list
|
||||||
|
sample: [
|
||||||
|
{
|
||||||
|
"locations": [
|
||||||
|
"southeastasia",
|
||||||
|
"eastasia"
|
||||||
|
],
|
||||||
|
"service": "Microsoft.Storage"
|
||||||
|
}
|
||||||
|
]
|
||||||
'''
|
'''
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -15,11 +15,11 @@ module: azure_rm_virtualnetworkgateway
|
||||||
|
|
||||||
version_added: "2.8"
|
version_added: "2.8"
|
||||||
|
|
||||||
short_description: Manage Azure virtual network gateways.
|
short_description: Manage Azure virtual network gateways
|
||||||
|
|
||||||
description:
|
description:
|
||||||
- Create, update or delete a virtual network gateway(VPN Gateway). When creating a VPN Gateway you must provide the name of an
|
- Create, update or delete a virtual network gateway(VPN Gateway).
|
||||||
existing virtual network.
|
- When creating a VPN Gateway you must provide the name of an existing virtual network.
|
||||||
|
|
||||||
options:
|
options:
|
||||||
resource_group:
|
resource_group:
|
||||||
|
@ -32,8 +32,7 @@ options:
|
||||||
required: true
|
required: true
|
||||||
state:
|
state:
|
||||||
description:
|
description:
|
||||||
- Assert the state of the VPN Gateway. Use 'present' to create or update VPN gateway and
|
- State of the VPN Gateway. Use C(present) to create or update VPN gateway and C(absent) to delete VPN gateway.
|
||||||
'absent' to delete VPN gateway.
|
|
||||||
default: present
|
default: present
|
||||||
choices:
|
choices:
|
||||||
- absent
|
- absent
|
||||||
|
@ -41,58 +40,58 @@ options:
|
||||||
required: false
|
required: false
|
||||||
location:
|
location:
|
||||||
description:
|
description:
|
||||||
- Valid azure location. Defaults to location of the resource group.
|
- Valid Azure location. Defaults to location of the resource group.
|
||||||
required: false
|
required: false
|
||||||
virtual_network:
|
virtual_network:
|
||||||
description:
|
description:
|
||||||
- An existing virtual network with which the VPN Gateway will be associated. Required
|
- An existing virtual network with which the VPN Gateway will be associated.
|
||||||
when creating a VPN Gateway.
|
- Required when creating a VPN Gateway.
|
||||||
- It can be the virtual network's name.
|
- Can be the name of the virtual network.
|
||||||
- Make sure your virtual network is in the same resource group as VPN gateway when you give only the name.
|
- Must be in the same resource group as VPN gateway when specified by name.
|
||||||
- It can be the virtual network's resource id.
|
- Can be the resource ID of the virtual network.
|
||||||
- It can be a dict which contains C(name) and C(resource_group) of the virtual network.
|
- Can be a dict which contains I(name) and I(resource_group) of the virtual network.
|
||||||
aliases:
|
aliases:
|
||||||
- virtual_network_name
|
- virtual_network_name
|
||||||
required: true
|
required: true
|
||||||
ip_configurations:
|
ip_configurations:
|
||||||
description:
|
description:
|
||||||
- List of ip configurations
|
- List of IP configurations.
|
||||||
suboptions:
|
suboptions:
|
||||||
name:
|
name:
|
||||||
description:
|
description:
|
||||||
- Name of the ip configuration.
|
- Name of the IP configuration.
|
||||||
required: true
|
required: true
|
||||||
private_ip_allocation_method:
|
private_ip_allocation_method:
|
||||||
description:
|
description:
|
||||||
- private ip allocation method.
|
- Private IP allocation method.
|
||||||
choices:
|
choices:
|
||||||
- dynamic
|
- dynamic
|
||||||
- static
|
- static
|
||||||
default: dynamic
|
default: dynamic
|
||||||
public_ip_address_name:
|
public_ip_address_name:
|
||||||
description:
|
description:
|
||||||
- Name of the public ip address. None for disable ip address.
|
- Name of the public IP address. Use 'None' to disable the public IP address.
|
||||||
subnet:
|
subnet:
|
||||||
description:
|
description:
|
||||||
- ID of the gateway subnet for VPN.
|
- ID of the gateway subnet for VPN.
|
||||||
default: GatewaySubnet
|
default: GatewaySubnet
|
||||||
gateway_type:
|
gateway_type:
|
||||||
description:
|
description:
|
||||||
- The type of this virtual network gateway
|
- The type of this virtual network gateway.
|
||||||
default: vpn
|
default: vpn
|
||||||
choices:
|
choices:
|
||||||
- vpn
|
- vpn
|
||||||
- express_route
|
- express_route
|
||||||
vpn_type:
|
vpn_type:
|
||||||
description:
|
description:
|
||||||
- The type of this virtual network gateway
|
- The type of this virtual private network.
|
||||||
default: route_based
|
default: route_based
|
||||||
choices:
|
choices:
|
||||||
- route_based
|
- route_based
|
||||||
- policy_based
|
- policy_based
|
||||||
enable_bgp:
|
enable_bgp:
|
||||||
description:
|
description:
|
||||||
- Whether BGP is enabled for this virtual network gateway or not
|
- Whether BGP is enabled for this virtual network gateway or not.
|
||||||
default: false
|
default: false
|
||||||
sku:
|
sku:
|
||||||
description:
|
description:
|
||||||
|
@ -116,7 +115,7 @@ extends_documentation_fragment:
|
||||||
- azure_tags
|
- azure_tags
|
||||||
|
|
||||||
author:
|
author:
|
||||||
- "Madhura Naniwadekar (@Madhura-CSI)"
|
- Madhura Naniwadekar (@Madhura-CSI)
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = '''
|
EXAMPLES = '''
|
||||||
|
@ -159,7 +158,7 @@ EXAMPLES = '''
|
||||||
RETURN = '''
|
RETURN = '''
|
||||||
id:
|
id:
|
||||||
description:
|
description:
|
||||||
- Virtual Network Gateway resource ID
|
- Virtual Network Gateway resource ID.
|
||||||
returned: always
|
returned: always
|
||||||
type: str
|
type: str
|
||||||
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworkGateways/myV
|
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/virtualNetworkGateways/myV
|
||||||
|
|
Loading…
Reference in a new issue