Bug fixes for GCP modules (as of 2019-01-09T15:35:45-08:00) (#50784)

This commit is contained in:
Alex Stephen 2019-01-16 11:15:15 -08:00 committed by ansibot
parent 5ca5936e05
commit 41c1f8b9a5
28 changed files with 230 additions and 197 deletions

View file

@ -187,6 +187,17 @@ items:
key that protects this resource.
returned: success
type: str
labels:
description:
- Labels to apply to this Image.
returned: success
type: dict
labelFingerprint:
description:
- The fingerprint used for optimistic locking of this resource. Used internally
during updates.
returned: success
type: str
licenses:
description:
- Any applicable license URI.
@ -229,10 +240,11 @@ items:
type: str
sourceDisk:
description:
- Refers to a gcompute_disk object You must provide either this property or
the rawDisk.source property but not both to create an image.
- The source disk to create this image based on.
- You must provide either this property or the rawDisk.source property but not
both to create an image.
returned: success
type: dict
type: str
sourceDiskEncryptionKey:
description:
- The customer-supplied encryption key of the source disk. Required if the source

View file

@ -127,7 +127,7 @@ options:
required: false
disk_type:
description:
- Reference to a gcompute_disk_type resource.
- Reference to a disk type.
- Specifies the disk type to use to create the instance.
- If not specified, the default is pd-standard.
required: false
@ -177,15 +177,14 @@ options:
- READ_ONLY
source:
description:
- Reference to a gcompute_disk resource. When creating a new instance, one
of initializeParams.sourceImage or disks.source is required.
- Reference to a disk. When creating a new instance, one of initializeParams.sourceImage
or disks.source is required.
- If desired, you can also attach existing non-root persistent disks using
this property. This field is only applicable for persistent disks.
- 'This field represents a link to a Disk resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_disk
task and then set this source field to "{{ name-of-resource }}" Alternatively,
you can set this source to a dictionary with the selfLink key where the
value is the selfLink of your Disk'
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_disk
task and then set this source field to "{{ name-of-resource }}"'
required: false
type:
description:
@ -261,17 +260,17 @@ options:
required: true
nat_ip:
description:
- Specifies the title of a gcompute_address.
- Reference to an address.
- An external IP address associated with this instance.
- Specify an unused static external IP address available to the project
or leave this field undefined to use an IP from a shared ephemeral IP
address pool. If you specify a static external IP address, it must live
in the same region as the zone of the instance.
- 'This field represents a link to a Address resource in GCP. It can be
specified in two ways. You can add `register: name-of-resource` to a
gcp_compute_address task and then set this nat_ip field to "{{ name-of-resource
}}" Alternatively, you can set this nat_ip to a dictionary with the
address key where the value is the address of your Address'
specified in two ways. First, you can place in the address of the resource
here as a string Alternatively, you can add `register: name-of-resource`
to a gcp_compute_address task and then set this nat_ip field to "{{
name-of-resource }}"'
required: false
type:
description:
@ -306,15 +305,14 @@ options:
required: false
network:
description:
- Specifies the title of an existing gcompute_network. When creating an instance,
if neither the network nor the subnetwork is specified, the default network
- Specifies the title of an existing network. When creating an instance, if
neither the network nor the subnetwork is specified, the default network
global/networks/default is used; if the network is not specified but the
subnetwork is specified, the network is inferred.
- 'This field represents a link to a Network resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_network
task and then set this network field to "{{ name-of-resource }}" Alternatively,
you can set this network to a dictionary with the selfLink key where the
value is the selfLink of your Network'
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_network
task and then set this network field to "{{ name-of-resource }}"'
required: false
network_ip:
description:
@ -324,15 +322,15 @@ options:
required: false
subnetwork:
description:
- Reference to a gcompute_subnetwork resource.
- Reference to a VPC network.
- If the network resource is in legacy mode, do not provide this property.
If the network is in auto subnet mode, providing the subnetwork is optional.
If the network is in custom subnet mode, then this field should be specified.
- 'This field represents a link to a Subnetwork resource in GCP. It can be
specified in two ways. You can add `register: name-of-resource` to a gcp_compute_subnetwork
task and then set this subnetwork field to "{{ name-of-resource }}" Alternatively,
you can set this subnetwork to a dictionary with the selfLink key where
the value is the selfLink of your Subnetwork'
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_subnetwork task and then set this subnetwork field to "{{
name-of-resource }}"'
required: false
scheduling:
description:
@ -574,7 +572,7 @@ disks:
type: int
diskType:
description:
- Reference to a gcompute_disk_type resource.
- Reference to a disk type.
- Specifies the disk type to use to create the instance.
- If not specified, the default is pd-standard.
returned: success
@ -625,12 +623,12 @@ disks:
type: str
source:
description:
- Reference to a gcompute_disk resource. When creating a new instance, one of
initializeParams.sourceImage or disks.source is required.
- Reference to a disk. When creating a new instance, one of initializeParams.sourceImage
or disks.source is required.
- If desired, you can also attach existing non-root persistent disks using this
property. This field is only applicable for persistent disks.
returned: success
type: dict
type: str
type:
description:
- Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified,
@ -719,14 +717,14 @@ networkInterfaces:
type: str
natIP:
description:
- Specifies the title of a gcompute_address.
- Reference to an address.
- An external IP address associated with this instance.
- Specify an unused static external IP address available to the project
or leave this field undefined to use an IP from a shared ephemeral IP
address pool. If you specify a static external IP address, it must live
in the same region as the zone of the instance.
returned: success
type: dict
type: str
type:
description:
- The type of configuration. The default and only option is ONE_TO_ONE_NAT.
@ -763,12 +761,12 @@ networkInterfaces:
type: str
network:
description:
- Specifies the title of an existing gcompute_network. When creating an instance,
if neither the network nor the subnetwork is specified, the default network
global/networks/default is used; if the network is not specified but the subnetwork
is specified, the network is inferred.
- Specifies the title of an existing network. When creating an instance, if
neither the network nor the subnetwork is specified, the default network global/networks/default
is used; if the network is not specified but the subnetwork is specified,
the network is inferred.
returned: success
type: dict
type: str
networkIP:
description:
- An IPv4 internal network address to assign to the instance for this network
@ -778,12 +776,12 @@ networkInterfaces:
type: str
subnetwork:
description:
- Reference to a gcompute_subnetwork resource.
- Reference to a VPC network.
- If the network resource is in legacy mode, do not provide this property. If
the network is in auto subnet mode, providing the subnetwork is optional.
If the network is in custom subnet mode, then this field should be specified.
returned: success
type: dict
type: str
scheduling:
description:
- Sets the scheduling options for this instance.
@ -915,7 +913,7 @@ def main():
)),
interface=dict(type='str', choices=['SCSI', 'NVME']),
mode=dict(type='str', choices=['READ_WRITE', 'READ_ONLY']),
source=dict(type='dict'),
source=dict(),
type=dict(type='str', choices=['SCRATCH', 'PERSISTENT'])
)),
guest_accelerators=dict(type='list', elements='dict', options=dict(
@ -930,7 +928,7 @@ def main():
network_interfaces=dict(type='list', elements='dict', options=dict(
access_configs=dict(type='list', elements='dict', options=dict(
name=dict(required=True, type='str'),
nat_ip=dict(type='dict'),
nat_ip=dict(),
type=dict(required=True, type='str', choices=['ONE_TO_ONE_NAT'])
)),
alias_ip_ranges=dict(type='list', elements='dict', options=dict(
@ -938,9 +936,9 @@ def main():
subnetwork_range_name=dict(type='str')
)),
name=dict(type='str'),
network=dict(type='dict'),
network=dict(),
network_ip=dict(type='str'),
subnetwork=dict(type='dict')
subnetwork=dict()
)),
scheduling=dict(type='dict', options=dict(
automatic_restart=dict(type='bool'),
@ -1200,7 +1198,7 @@ def decode_response(response, module):
return response
# TODO(alexstephen): Implement updating metadata on exsiting resources.
# TODO(alexstephen): Implement updating metadata on existing resources.
# Expose instance 'metadata' as a simple name/value pair hash. However the API
# defines metadata as a NestedObject with the following layout:

View file

@ -169,7 +169,7 @@ items:
type: int
diskType:
description:
- Reference to a gcompute_disk_type resource.
- Reference to a disk type.
- Specifies the disk type to use to create the instance.
- If not specified, the default is pd-standard.
returned: success
@ -221,12 +221,12 @@ items:
type: str
source:
description:
- Reference to a gcompute_disk resource. When creating a new instance, one
of initializeParams.sourceImage or disks.source is required.
- Reference to a disk. When creating a new instance, one of initializeParams.sourceImage
or disks.source is required.
- If desired, you can also attach existing non-root persistent disks using
this property. This field is only applicable for persistent disks.
returned: success
type: dict
type: str
type:
description:
- Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified,
@ -317,14 +317,14 @@ items:
type: str
natIP:
description:
- Specifies the title of a gcompute_address.
- Reference to an address.
- An external IP address associated with this instance.
- Specify an unused static external IP address available to the project
or leave this field undefined to use an IP from a shared ephemeral
IP address pool. If you specify a static external IP address, it must
live in the same region as the zone of the instance.
returned: success
type: dict
type: str
type:
description:
- The type of configuration. The default and only option is ONE_TO_ONE_NAT.
@ -361,12 +361,12 @@ items:
type: str
network:
description:
- Specifies the title of an existing gcompute_network. When creating an
instance, if neither the network nor the subnetwork is specified, the
default network global/networks/default is used; if the network is not
specified but the subnetwork is specified, the network is inferred.
- Specifies the title of an existing network. When creating an instance,
if neither the network nor the subnetwork is specified, the default network
global/networks/default is used; if the network is not specified but the
subnetwork is specified, the network is inferred.
returned: success
type: dict
type: str
networkIP:
description:
- An IPv4 internal network address to assign to the instance for this network
@ -376,12 +376,12 @@ items:
type: str
subnetwork:
description:
- Reference to a gcompute_subnetwork resource.
- Reference to a VPC network.
- If the network resource is in legacy mode, do not provide this property.
If the network is in auto subnet mode, providing the subnetwork is optional.
If the network is in custom subnet mode, then this field should be specified.
returned: success
type: dict
type: str
scheduling:
description:
- Sets the scheduling options for this instance.

View file

@ -84,10 +84,9 @@ options:
description:
- The network to which all instances in the instance group belong.
- 'This field represents a link to a Network resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_network
task and then set this network field to "{{ name-of-resource }}" Alternatively,
you can set this network to a dictionary with the selfLink key where the value
is the selfLink of your Network'
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_network
task and then set this network field to "{{ name-of-resource }}"'
required: false
region:
description:
@ -97,10 +96,9 @@ options:
description:
- The subnetwork to which all instances in the instance group belong.
- 'This field represents a link to a Subnetwork resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_subnetwork
task and then set this subnetwork field to "{{ name-of-resource }}" Alternatively,
you can set this subnetwork to a dictionary with the selfLink key where the
value is the selfLink of your Subnetwork'
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_subnetwork
task and then set this subnetwork field to "{{ name-of-resource }}"'
required: false
zone:
description:
@ -191,7 +189,7 @@ network:
description:
- The network to which all instances in the instance group belong.
returned: success
type: dict
type: str
region:
description:
- The region where the instance group is located (for regional resources).
@ -201,7 +199,7 @@ subnetwork:
description:
- The subnetwork to which all instances in the instance group belong.
returned: success
type: dict
type: str
zone:
description:
- A reference to the zone where the instance group resides.
@ -244,11 +242,11 @@ def main():
name=dict(type='str'),
port=dict(type='int')
)),
network=dict(type='dict'),
network=dict(),
region=dict(type='str'),
subnetwork=dict(type='dict'),
subnetwork=dict(),
zone=dict(required=True, type='str'),
instances=dict(type='list', elements='dict')
instances=dict(type='list')
)
)

View file

@ -118,7 +118,7 @@ items:
description:
- The network to which all instances in the instance group belong.
returned: success
type: dict
type: str
region:
description:
- The region where the instance group is located (for regional resources).
@ -128,7 +128,7 @@ items:
description:
- The subnetwork to which all instances in the instance group belong.
returned: success
type: dict
type: str
zone:
description:
- A reference to the zone where the instance group resides.

View file

@ -71,10 +71,10 @@ options:
group uses this template to create all new instances in the managed instance
group.
- 'This field represents a link to a InstanceTemplate resource in GCP. It can
be specified in two ways. You can add `register: name-of-resource` to a gcp_compute_instance_template
task and then set this instance_template field to "{{ name-of-resource }}" Alternatively,
you can set this instance_template to a dictionary with the selfLink key where
the value is the selfLink of your InstanceTemplate'
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_instance_template task and then set this instance_template field
to "{{ name-of-resource }}"'
required: true
name:
description:
@ -262,13 +262,13 @@ instanceGroup:
description:
- The instance group being managed.
returned: success
type: dict
type: str
instanceTemplate:
description:
- The instance template that is specified for this managed instance group. The group
uses this template to create all new instances in the managed instance group.
returned: success
type: dict
type: str
name:
description:
- The name of the managed instance group. The name must be 1-63 characters long,
@ -340,13 +340,13 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'),
base_instance_name=dict(required=True, type='str'),
description=dict(type='str'),
instance_template=dict(required=True, type='dict'),
instance_template=dict(required=True),
name=dict(required=True, type='str'),
named_ports=dict(type='list', elements='dict', options=dict(
name=dict(type='str'),
port=dict(type='int')
)),
target_pools=dict(type='list', elements='dict'),
target_pools=dict(type='list'),
target_size=dict(type='int'),
zone=dict(required=True, type='str')
)

View file

@ -162,14 +162,14 @@ items:
description:
- The instance group being managed.
returned: success
type: dict
type: str
instanceTemplate:
description:
- The instance template that is specified for this managed instance group. The
group uses this template to create all new instances in the managed instance
group.
returned: success
type: dict
type: str
name:
description:
- The name of the managed instance group. The name must be 1-63 characters long,

View file

@ -154,7 +154,7 @@ options:
required: false
disk_type:
description:
- Reference to a gcompute_disk_type resource.
- Reference to a disk type.
- Specifies the disk type to use to create the instance.
- If not specified, the default is pd-standard.
required: false
@ -205,17 +205,17 @@ options:
- READ_ONLY
source:
description:
- Reference to a gcompute_disk resource. When creating a new instance,
one of initializeParams.sourceImage or disks.source is required.
- Reference to a disk. When creating a new instance, one of initializeParams.sourceImage
or disks.source is required.
- If desired, you can also attach existing non-root persistent disks using
this property. This field is only applicable for persistent disks.
- Note that for InstanceTemplate, specify the disk name, not the URL for
the disk.
- 'This field represents a link to a Disk resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_disk
task and then set this source field to "{{ name-of-resource }}" Alternatively,
you can set this source to a dictionary with the name key where the
value is the name of your Disk'
in two ways. First, you can place in the name of the resource here as
a string Alternatively, you can add `register: name-of-resource` to
a gcp_compute_disk task and then set this source field to "{{ name-of-resource
}}"'
required: false
type:
description:
@ -227,7 +227,7 @@ options:
- PERSISTENT
machine_type:
description:
- Reference to a gcompute_machine_type resource.
- The machine type to use in the VM instance template.
required: true
min_cpu_platform:
description:
@ -277,18 +277,17 @@ options:
required: true
nat_ip:
description:
- Specifies the title of a gcompute_address.
- Reference to an address.
- An external IP address associated with this instance.
- Specify an unused static external IP address available to the project
or leave this field undefined to use an IP from a shared ephemeral
IP address pool. If you specify a static external IP address, it
must live in the same region as the zone of the instance.
- 'This field represents a link to a Address resource in GCP. It can
be specified in two ways. You can add `register: name-of-resource`
to a gcp_compute_address task and then set this nat_ip field to
"{{ name-of-resource }}" Alternatively, you can set this nat_ip
to a dictionary with the address key where the value is the address
of your Address'
be specified in two ways. First, you can place in the address of
the resource here as a string Alternatively, you can add `register:
name-of-resource` to a gcp_compute_address task and then set this
nat_ip field to "{{ name-of-resource }}"'
required: false
type:
description:
@ -324,15 +323,15 @@ options:
required: false
network:
description:
- Specifies the title of an existing gcompute_network. When creating an
instance, if neither the network nor the subnetwork is specified, the
default network global/networks/default is used; if the network is not
specified but the subnetwork is specified, the network is inferred.
- Specifies the title of an existing network. When creating an instance,
if neither the network nor the subnetwork is specified, the default
network global/networks/default is used; if the network is not specified
but the subnetwork is specified, the network is inferred.
- 'This field represents a link to a Network resource in GCP. It can be
specified in two ways. You can add `register: name-of-resource` to a
gcp_compute_network task and then set this network field to "{{ name-of-resource
}}" Alternatively, you can set this network to a dictionary with the
selfLink key where the value is the selfLink of your Network'
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_network task and then set this network field to "{{
name-of-resource }}"'
required: false
network_ip:
description:
@ -342,16 +341,15 @@ options:
required: false
subnetwork:
description:
- Reference to a gcompute_subnetwork resource.
- Reference to a VPC network.
- If the network resource is in legacy mode, do not provide this property.
If the network is in auto subnet mode, providing the subnetwork is optional.
If the network is in custom subnet mode, then this field should be specified.
- 'This field represents a link to a Subnetwork resource in GCP. It can
be specified in two ways. You can add `register: name-of-resource` to
a gcp_compute_subnetwork task and then set this subnetwork field to
"{{ name-of-resource }}" Alternatively, you can set this subnetwork
to a dictionary with the selfLink key where the value is the selfLink
of your Subnetwork'
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_subnetwork task and then set this subnetwork field
to "{{ name-of-resource }}"'
required: false
scheduling:
description:
@ -585,7 +583,7 @@ properties:
type: int
diskType:
description:
- Reference to a gcompute_disk_type resource.
- Reference to a disk type.
- Specifies the disk type to use to create the instance.
- If not specified, the default is pd-standard.
returned: success
@ -637,14 +635,14 @@ properties:
type: str
source:
description:
- Reference to a gcompute_disk resource. When creating a new instance, one
of initializeParams.sourceImage or disks.source is required.
- Reference to a disk. When creating a new instance, one of initializeParams.sourceImage
or disks.source is required.
- If desired, you can also attach existing non-root persistent disks using
this property. This field is only applicable for persistent disks.
- Note that for InstanceTemplate, specify the disk name, not the URL for
the disk.
returned: success
type: dict
type: str
type:
description:
- Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified,
@ -653,7 +651,7 @@ properties:
type: str
machineType:
description:
- Reference to a gcompute_machine_type resource.
- The machine type to use in the VM instance template.
returned: success
type: str
minCpuPlatform:
@ -710,14 +708,14 @@ properties:
type: str
natIP:
description:
- Specifies the title of a gcompute_address.
- Reference to an address.
- An external IP address associated with this instance.
- Specify an unused static external IP address available to the project
or leave this field undefined to use an IP from a shared ephemeral
IP address pool. If you specify a static external IP address, it must
live in the same region as the zone of the instance.
returned: success
type: dict
type: str
type:
description:
- The type of configuration. The default and only option is ONE_TO_ONE_NAT.
@ -754,12 +752,12 @@ properties:
type: str
network:
description:
- Specifies the title of an existing gcompute_network. When creating an
instance, if neither the network nor the subnetwork is specified, the
default network global/networks/default is used; if the network is not
specified but the subnetwork is specified, the network is inferred.
- Specifies the title of an existing network. When creating an instance,
if neither the network nor the subnetwork is specified, the default network
global/networks/default is used; if the network is not specified but the
subnetwork is specified, the network is inferred.
returned: success
type: dict
type: str
networkIP:
description:
- An IPv4 internal network address to assign to the instance for this network
@ -769,12 +767,12 @@ properties:
type: str
subnetwork:
description:
- Reference to a gcompute_subnetwork resource.
- Reference to a VPC network.
- If the network resource is in legacy mode, do not provide this property.
If the network is in auto subnet mode, providing the subnetwork is optional.
If the network is in custom subnet mode, then this field should be specified.
returned: success
type: dict
type: str
scheduling:
description:
- Sets the scheduling options for this instance.
@ -894,7 +892,7 @@ def main():
)),
interface=dict(type='str', choices=['SCSI', 'NVME']),
mode=dict(type='str', choices=['READ_WRITE', 'READ_ONLY']),
source=dict(type='dict'),
source=dict(),
type=dict(type='str', choices=['SCRATCH', 'PERSISTENT'])
)),
machine_type=dict(required=True, type='str'),
@ -907,7 +905,7 @@ def main():
network_interfaces=dict(type='list', elements='dict', options=dict(
access_configs=dict(type='list', elements='dict', options=dict(
name=dict(required=True, type='str'),
nat_ip=dict(type='dict'),
nat_ip=dict(),
type=dict(required=True, type='str', choices=['ONE_TO_ONE_NAT'])
)),
alias_ip_ranges=dict(type='list', elements='dict', options=dict(
@ -915,9 +913,9 @@ def main():
subnetwork_range_name=dict(type='str')
)),
name=dict(type='str'),
network=dict(type='dict'),
network=dict(),
network_ip=dict(type='str'),
subnetwork=dict(type='dict')
subnetwork=dict()
)),
scheduling=dict(type='dict', options=dict(
automatic_restart=dict(type='bool'),
@ -1120,7 +1118,7 @@ def decode_response(response, module):
return response
# TODO(alexstephen): Implement updating metadata on exsiting resources.
# TODO(alexstephen): Implement updating metadata on existing resources.
# Expose instance 'metadata' as a simple name/value pair hash. However the API
# defines metadata as a NestedObject with the following layout:

View file

@ -190,7 +190,7 @@ items:
type: int
diskType:
description:
- Reference to a gcompute_disk_type resource.
- Reference to a disk type.
- Specifies the disk type to use to create the instance.
- If not specified, the default is pd-standard.
returned: success
@ -243,15 +243,15 @@ items:
type: str
source:
description:
- Reference to a gcompute_disk resource. When creating a new instance,
one of initializeParams.sourceImage or disks.source is required.
- Reference to a disk. When creating a new instance, one of initializeParams.sourceImage
or disks.source is required.
- If desired, you can also attach existing non-root persistent disks
using this property. This field is only applicable for persistent
disks.
- Note that for InstanceTemplate, specify the disk name, not the URL
for the disk.
returned: success
type: dict
type: str
type:
description:
- Specifies the type of the disk, either SCRATCH or PERSISTENT. If not
@ -260,7 +260,7 @@ items:
type: str
machineType:
description:
- Reference to a gcompute_machine_type resource.
- The machine type to use in the VM instance template.
returned: success
type: str
minCpuPlatform:
@ -320,14 +320,14 @@ items:
type: str
natIP:
description:
- Specifies the title of a gcompute_address.
- Reference to an address.
- An external IP address associated with this instance.
- Specify an unused static external IP address available to the
project or leave this field undefined to use an IP from a shared
ephemeral IP address pool. If you specify a static external IP
address, it must live in the same region as the zone of the instance.
returned: success
type: dict
type: str
type:
description:
- The type of configuration. The default and only option is ONE_TO_ONE_NAT.
@ -366,12 +366,12 @@ items:
type: str
network:
description:
- Specifies the title of an existing gcompute_network. When creating
an instance, if neither the network nor the subnetwork is specified,
the default network global/networks/default is used; if the network
is not specified but the subnetwork is specified, the network is inferred.
- Specifies the title of an existing network. When creating an instance,
if neither the network nor the subnetwork is specified, the default
network global/networks/default is used; if the network is not specified
but the subnetwork is specified, the network is inferred.
returned: success
type: dict
type: str
networkIP:
description:
- An IPv4 internal network address to assign to the instance for this
@ -381,13 +381,13 @@ items:
type: str
subnetwork:
description:
- Reference to a gcompute_subnetwork resource.
- Reference to a VPC network.
- If the network resource is in legacy mode, do not provide this property.
If the network is in auto subnet mode, providing the subnetwork is
optional. If the network is in custom subnet mode, then this field
should be specified.
returned: success
type: dict
type: str
scheduling:
description:
- Sets the scheduling options for this instance.

View file

@ -90,7 +90,7 @@ items:
type: str
description:
description:
- An optional description of this resource. .
- An optional description of this resource.
returned: success
type: str
privateInterconnectInfo:
@ -119,7 +119,7 @@ items:
will automatically connect the Interconnect to the network & region within
which the Cloud Router is configured.
returned: success
type: dict
type: str
creationTimestamp:
description:
- Creation timestamp in RFC3339 text format.

View file

@ -129,10 +129,9 @@ options:
- The source snapshot used to create this disk. You can provide this as a partial
or full URL to the resource.
- 'This field represents a link to a Snapshot resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_snapshot
task and then set this source_snapshot field to "{{ name-of-resource }}" Alternatively,
you can set this source_snapshot to a dictionary with the selfLink key where
the value is the selfLink of your Snapshot'
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_snapshot
task and then set this source_snapshot field to "{{ name-of-resource }}"'
required: false
source_snapshot_encryption_key:
description:
@ -165,8 +164,8 @@ EXAMPLES = '''
raw_key: SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=
region: us-central1
replica_zones:
- us-central1-a
- us-central1-f
- https://www.googleapis.com/compute/v1/projects/google.com:graphite-playground/zones/us-central1-a
- https://www.googleapis.com/compute/v1/projects/google.com:graphite-playground/zones/us-central1-b
project: "test_project"
auth_kind: "serviceaccount"
service_account_file: "/tmp/auth.pem"
@ -288,7 +287,7 @@ sourceSnapshot:
- The source snapshot used to create this disk. You can provide this as a partial
or full URL to the resource.
returned: success
type: dict
type: str
sourceSnapshotEncryptionKey:
description:
- The customer-supplied encryption key of the source snapshot. Required if the source
@ -351,7 +350,7 @@ def main():
raw_key=dict(type='str'),
sha256=dict(type='str')
)),
source_snapshot=dict(type='dict'),
source_snapshot=dict(),
source_snapshot_encryption_key=dict(type='dict', options=dict(
raw_key=dict(type='str'),
sha256=dict(type='str')

View file

@ -185,7 +185,7 @@ items:
- The source snapshot used to create this disk. You can provide this as a partial
or full URL to the resource.
returned: success
type: dict
type: str
sourceSnapshotEncryptionKey:
description:
- The customer-supplied encryption key of the source snapshot. Required if the

View file

@ -87,10 +87,9 @@ options:
description:
- The network that this route applies to.
- 'This field represents a link to a Network resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_network
task and then set this network field to "{{ name-of-resource }}" Alternatively,
you can set this network to a dictionary with the selfLink key where the value
is the selfLink of your Network'
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_network
task and then set this network field to "{{ name-of-resource }}"'
required: true
priority:
description:
@ -118,6 +117,10 @@ options:
- 'You can specify this as a full or partial URL. For example: * U(https://www.googleapis.com/compute/v1/projects/project/zones/zone/)
instances/instance * projects/project/zones/zone/instances/instance * zones/zone/instances/instance
.'
- 'This field represents a link to a Instance 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_instance
task and then set this next_hop_instance field to "{{ name-of-resource }}"'
required: false
next_hop_ip:
description:
@ -126,6 +129,10 @@ options:
next_hop_vpn_tunnel:
description:
- 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
extends_documentation_fragment: gcp
notes:
@ -185,7 +192,7 @@ network:
description:
- The network that this route applies to.
returned: success
type: dict
type: str
priority:
description:
- The priority of this route. Priority is used to break ties in cases where there
@ -256,13 +263,13 @@ def main():
dest_range=dict(required=True, type='str'),
description=dict(type='str'),
name=dict(required=True, type='str'),
network=dict(required=True, type='dict'),
network=dict(required=True),
priority=dict(type='int'),
tags=dict(type='list', elements='str'),
next_hop_gateway=dict(type='str'),
next_hop_instance=dict(type='str'),
next_hop_instance=dict(),
next_hop_ip=dict(type='str'),
next_hop_vpn_tunnel=dict(type='str')
next_hop_vpn_tunnel=dict()
)
)
@ -321,9 +328,9 @@ def resource_to_request(module):
u'priority': module.params.get('priority'),
u'tags': module.params.get('tags'),
u'nextHopGateway': module.params.get('next_hop_gateway'),
u'nextHopInstance': module.params.get('next_hop_instance'),
u'nextHopInstance': replace_resource_dict(module.params.get(u'next_hop_instance', {}), 'selfLink'),
u'nextHopIp': module.params.get('next_hop_ip'),
u'nextHopVpnTunnel': module.params.get('next_hop_vpn_tunnel')
u'nextHopVpnTunnel': replace_resource_dict(module.params.get(u'next_hop_vpn_tunnel', {}), 'selfLink')
}
return_vals = {}
for k, v in request.items():
@ -396,9 +403,9 @@ def response_to_hash(module, response):
u'priority': module.params.get('priority'),
u'tags': module.params.get('tags'),
u'nextHopGateway': module.params.get('next_hop_gateway'),
u'nextHopInstance': module.params.get('next_hop_instance'),
u'nextHopInstance': replace_resource_dict(module.params.get(u'next_hop_instance', {}), 'selfLink'),
u'nextHopIp': module.params.get('next_hop_ip'),
u'nextHopVpnTunnel': module.params.get('next_hop_vpn_tunnel'),
u'nextHopVpnTunnel': replace_resource_dict(module.params.get(u'next_hop_vpn_tunnel', {}), 'selfLink'),
u'nextHopNetwork': response.get(u'nextHopNetwork')
}

View file

@ -91,7 +91,7 @@ items:
description:
- The network that this route applies to.
returned: success
type: dict
type: str
priority:
description:
- The priority of this route. Priority is used to break ties in cases where

View file

@ -64,10 +64,9 @@ options:
description:
- A reference to the network to which this router belongs.
- 'This field represents a link to a Network resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_network
task and then set this network field to "{{ name-of-resource }}" Alternatively,
you can set this network to a dictionary with the selfLink key where the value
is the selfLink of your Network'
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_network
task and then set this network field to "{{ name-of-resource }}"'
required: true
bgp:
description:
@ -183,7 +182,7 @@ network:
description:
- A reference to the network to which this router belongs.
returned: success
type: dict
type: str
bgp:
description:
- BGP information specific to this router.
@ -260,7 +259,7 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'),
name=dict(required=True, type='str'),
description=dict(type='str'),
network=dict(required=True, type='dict'),
network=dict(required=True),
bgp=dict(type='dict', options=dict(
asn=dict(required=True, type='int'),
advertise_mode=dict(default='DEFAULT', type='str', choices=['DEFAULT', 'CUSTOM']),

View file

@ -98,7 +98,7 @@ items:
description:
- A reference to the network to which this router belongs.
returned: success
type: dict
type: str
bgp:
description:
- BGP information specific to this router.

View file

@ -90,10 +90,9 @@ options:
- The network this subnet belongs to.
- Only networks that are in the distributed mode can have subnetworks.
- 'This field represents a link to a Network resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_network
task and then set this network field to "{{ name-of-resource }}" Alternatively,
you can set this network to a dictionary with the selfLink key where the value
is the selfLink of your Network'
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_network
task and then set this network field to "{{ name-of-resource }}"'
required: true
enable_flow_logs:
description:
@ -208,7 +207,7 @@ network:
- The network this subnet belongs to.
- Only networks that are in the distributed mode can have subnetworks.
returned: success
type: dict
type: str
enableFlowLogs:
description:
- Whether to enable flow logging for this subnetwork.
@ -278,7 +277,7 @@ def main():
description=dict(type='str'),
ip_cidr_range=dict(required=True, type='str'),
name=dict(required=True, type='str'),
network=dict(required=True, type='dict'),
network=dict(required=True),
enable_flow_logs=dict(type='bool'),
secondary_ip_ranges=dict(type='list', elements='dict', options=dict(
range_name=dict(required=True, type='str'),

View file

@ -115,7 +115,7 @@ items:
- The network this subnet belongs to.
- Only networks that are in the distributed mode can have subnetworks.
returned: success
type: dict
type: str
enableFlowLogs:
description:
- Whether to enable flow logging for this subnetwork.

View file

@ -67,10 +67,9 @@ options:
- A reference to the UrlMap resource that defines the mapping from URL to the
BackendService.
- 'This field represents a link to a UrlMap resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_url_map
task and then set this url_map field to "{{ name-of-resource }}" Alternatively,
you can set this url_map to a dictionary with the selfLink key where the value
is the selfLink of your UrlMap'
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_url_map
task and then set this url_map field to "{{ name-of-resource }}"'
required: true
extends_documentation_fragment: gcp
notes:
@ -166,7 +165,7 @@ urlMap:
description:
- A reference to the UrlMap resource that defines the mapping from URL to the BackendService.
returned: success
type: dict
type: str
'''
################################################################################
@ -190,7 +189,7 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'),
description=dict(type='str'),
name=dict(required=True, type='str'),
url_map=dict(required=True, type='dict')
url_map=dict(required=True)
)
)

View file

@ -211,6 +211,7 @@
- result.has_key('kind') == False
#---------------------------------------------------------
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a address
gcp_compute_address:
name: "address-instance"
@ -220,6 +221,7 @@
service_account_file: "{{ gcp_cred_file }}"
state: absent
register: address
ignore_errors: true
- name: delete a network
gcp_compute_network:
name: "network-instance"
@ -228,6 +230,7 @@
service_account_file: "{{ gcp_cred_file }}"
state: absent
register: network
ignore_errors: true
- name: delete a disk
gcp_compute_disk:
name: "disk-instance"
@ -239,3 +242,4 @@
service_account_file: "{{ gcp_cred_file }}"
state: absent
register: disk
ignore_errors: true

View file

@ -141,6 +141,7 @@
- result.has_key('kind') == False
#---------------------------------------------------------
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a network
gcp_compute_network:
name: "network-instancegroup"
@ -149,3 +150,4 @@
service_account_file: "{{ gcp_cred_file }}"
state: absent
register: network
ignore_errors: true

View file

@ -166,6 +166,7 @@
- result.has_key('kind') == False
#---------------------------------------------------------
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a instance template
gcp_compute_instance_template:
name: "{{ resource_name }}"
@ -187,6 +188,7 @@
service_account_file: "{{ gcp_cred_file }}"
state: absent
register: instancetemplate
ignore_errors: true
- name: delete a address
gcp_compute_address:
name: "address-instancetemplate"
@ -196,6 +198,7 @@
service_account_file: "{{ gcp_cred_file }}"
state: absent
register: address
ignore_errors: true
- name: delete a network
gcp_compute_network:
name: "network-instancetemplate"
@ -204,3 +207,4 @@
service_account_file: "{{ gcp_cred_file }}"
state: absent
register: network
ignore_errors: true

View file

@ -188,6 +188,7 @@
- result.has_key('kind') == False
#---------------------------------------------------------
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a address
gcp_compute_address:
name: "address-instancetemplate"
@ -197,6 +198,7 @@
service_account_file: "{{ gcp_cred_file }}"
state: absent
register: address
ignore_errors: true
- name: delete a network
gcp_compute_network:
name: "network-instancetemplate"
@ -205,3 +207,4 @@
service_account_file: "{{ gcp_cred_file }}"
state: absent
register: network
ignore_errors: true

View file

@ -21,8 +21,8 @@
raw_key: SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=
region: us-central1
replica_zones:
- us-central1-a
- us-central1-f
- https://www.googleapis.com/compute/v1/projects/google.com:graphite-playground/zones/us-central1-a
- https://www.googleapis.com/compute/v1/projects/google.com:graphite-playground/zones/us-central1-b
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
@ -36,8 +36,8 @@
raw_key: SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=
region: us-central1
replica_zones:
- us-central1-a
- us-central1-f
- https://www.googleapis.com/compute/v1/projects/google.com:graphite-playground/zones/us-central1-a
- https://www.googleapis.com/compute/v1/projects/google.com:graphite-playground/zones/us-central1-b
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
@ -72,8 +72,8 @@
raw_key: SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=
region: us-central1
replica_zones:
- us-central1-a
- us-central1-f
- https://www.googleapis.com/compute/v1/projects/google.com:graphite-playground/zones/us-central1-a
- https://www.googleapis.com/compute/v1/projects/google.com:graphite-playground/zones/us-central1-b
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
@ -93,8 +93,8 @@
raw_key: SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=
region: us-central1
replica_zones:
- us-central1-a
- us-central1-f
- https://www.googleapis.com/compute/v1/projects/google.com:graphite-playground/zones/us-central1-a
- https://www.googleapis.com/compute/v1/projects/google.com:graphite-playground/zones/us-central1-b
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
@ -129,8 +129,8 @@
raw_key: SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=
region: us-central1
replica_zones:
- us-central1-a
- us-central1-f
- https://www.googleapis.com/compute/v1/projects/google.com:graphite-playground/zones/us-central1-a
- https://www.googleapis.com/compute/v1/projects/google.com:graphite-playground/zones/us-central1-b
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"

View file

@ -144,6 +144,7 @@
- result.has_key('kind') == False
#---------------------------------------------------------
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a network
gcp_compute_network:
name: "network-route"
@ -152,3 +153,4 @@
service_account_file: "{{ gcp_cred_file }}"
state: absent
register: network
ignore_errors: true

View file

@ -166,6 +166,7 @@
- result.has_key('kind') == False
#---------------------------------------------------------
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a network
gcp_compute_network:
name: "network-router"
@ -174,3 +175,4 @@
service_account_file: "{{ gcp_cred_file }}"
state: absent
register: network
ignore_errors: true

View file

@ -132,6 +132,7 @@
- result.has_key('kind') == False
#---------------------------------------------------------
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a network
gcp_compute_network:
name: "network-subnetwork"
@ -141,3 +142,4 @@
service_account_file: "{{ gcp_cred_file }}"
state: absent
register: network
ignore_errors: true

View file

@ -154,6 +154,7 @@
- result.has_key('kind') == False
#---------------------------------------------------------
# Post-test teardown
# If errors happen, don't crash the playbook!
- name: delete a url map
gcp_compute_url_map:
name: "urlmap-targethttpproxy"
@ -163,6 +164,7 @@
service_account_file: "{{ gcp_cred_file }}"
state: absent
register: urlmap
ignore_errors: true
- name: delete a backend service
gcp_compute_backend_service:
name: "backendservice-targethttpproxy"
@ -176,6 +178,7 @@
service_account_file: "{{ gcp_cred_file }}"
state: absent
register: backendservice
ignore_errors: true
- name: delete a http health check
gcp_compute_http_health_check:
name: "httphealthcheck-targethttpproxy"
@ -188,6 +191,7 @@
service_account_file: "{{ gcp_cred_file }}"
state: absent
register: healthcheck
ignore_errors: true
- name: delete a instance group
gcp_compute_instance_group:
name: "instancegroup-targethttpproxy"
@ -197,3 +201,4 @@
service_account_file: "{{ gcp_cred_file }}"
state: absent
register: instancegroup
ignore_errors: true