Bug fixes for GCP modules (#59130)

pull/59267/head
The Magician 5 years ago committed by ansibot
parent 6128d0cd8b
commit 5f222c478d

@ -56,6 +56,7 @@ options:
- An optional description of this resource. Provide this property when you create - An optional description of this resource. Provide this property when you create
the resource. the resource.
required: false required: false
type: str
ip_address: ip_address:
description: description:
- The IP address that this forwarding rule is serving on behalf of. - The IP address that this forwarding rule is serving on behalf of.
@ -78,6 +79,7 @@ options:
* projects/project/regions/region/addresses/address * regions/region/addresses/address * projects/project/regions/region/addresses/address * regions/region/addresses/address
* global/addresses/address * address .' * global/addresses/address * address .'
required: false required: false
type: str
ip_protocol: ip_protocol:
description: description:
- The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP, - The IP protocol to which this rule applies. Valid options are TCP, UDP, ESP,
@ -85,12 +87,14 @@ options:
TCP is valid. TCP is valid.
- 'Some valid choices include: "TCP", "UDP", "ESP", "AH", "SCTP", "ICMP"' - 'Some valid choices include: "TCP", "UDP", "ESP", "AH", "SCTP", "ICMP"'
required: false required: false
type: str
ip_version: ip_version:
description: description:
- The IP Version that will be used by this global forwarding rule. - The IP Version that will be used by this global forwarding rule.
- Valid options are IPV4 or IPV6. - Valid options are IPV4 or IPV6.
- 'Some valid choices include: "IPV4", "IPV6"' - 'Some valid choices include: "IPV4", "IPV6"'
required: false required: false
type: str
load_balancing_scheme: load_balancing_scheme:
description: description:
- This signifies what the GlobalForwardingRule will be used for. - This signifies what the GlobalForwardingRule will be used for.
@ -101,6 +105,7 @@ options:
- 'Some valid choices include: "INTERNAL_SELF_MANAGED", "EXTERNAL"' - 'Some valid choices include: "INTERNAL_SELF_MANAGED", "EXTERNAL"'
required: false required: false
default: EXTERNAL default: EXTERNAL
type: str
name: name:
description: description:
- Name of the resource; provided by the client when the resource is created. The - Name of the resource; provided by the client when the resource is created. The
@ -110,6 +115,7 @@ options:
characters must be a dash, lowercase letter, or digit, except the last character, characters must be a dash, lowercase letter, or digit, except the last character,
which cannot be a dash. which cannot be a dash.
required: true required: true
type: str
network: network:
description: description:
- This field is not used for external load balancing. - This field is not used for external load balancing.
@ -122,6 +128,7 @@ options:
to a gcp_compute_network task and then set this network field to "{{ name-of-resource to a gcp_compute_network task and then set this network field to "{{ name-of-resource
}}"' }}"'
required: false required: false
type: dict
port_range: port_range:
description: description:
- This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, - This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy,
@ -136,11 +143,13 @@ options:
43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 * TargetVpnGateway: 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 * TargetVpnGateway:
500, 4500 .' 500, 4500 .'
required: false required: false
type: str
target: target:
description: description:
- The URL of the target resource to receive the matched traffic. - The URL of the target resource to receive the matched traffic.
- The forwarded traffic must be of a type appropriate to the target object. - The forwarded traffic must be of a type appropriate to the target object.
required: true required: true
type: str
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
''' '''

@ -60,17 +60,20 @@ options:
- How often (in seconds) to send a health check. The default value is 5 seconds. - How often (in seconds) to send a health check. The default value is 5 seconds.
required: false required: false
default: '5' default: '5'
type: int
description: description:
description: description:
- An optional description of this resource. Provide this property when you create - An optional description of this resource. Provide this property when you create
the resource. the resource.
required: false required: false
type: str
healthy_threshold: healthy_threshold:
description: description:
- A so-far unhealthy instance will be marked healthy after this many consecutive - A so-far unhealthy instance will be marked healthy after this many consecutive
successes. The default value is 2. successes. The default value is 2.
required: false required: false
default: '2' default: '2'
type: int
name: name:
description: description:
- Name of the resource. Provided by the client when the resource is created. The - Name of the resource. Provided by the client when the resource is created. The
@ -80,6 +83,7 @@ options:
characters must be a dash, lowercase letter, or digit, except the last character, characters must be a dash, lowercase letter, or digit, except the last character,
which cannot be a dash. which cannot be a dash.
required: true required: true
type: str
timeout_sec: timeout_sec:
description: description:
- How long (in seconds) to wait before claiming failure. - How long (in seconds) to wait before claiming failure.
@ -87,6 +91,7 @@ options:
value than checkIntervalSec. value than checkIntervalSec.
required: false required: false
default: '5' default: '5'
type: int
aliases: aliases:
- timeout_seconds - timeout_seconds
unhealthy_threshold: unhealthy_threshold:
@ -95,6 +100,7 @@ options:
failures. The default value is 2. failures. The default value is 2.
required: false required: false
default: '2' default: '2'
type: int
type: type:
description: description:
- Specifies the type of the healthCheck, either TCP, SSL, HTTP or HTTPS. If not - Specifies the type of the healthCheck, either TCP, SSL, HTTP or HTTPS. If not
@ -102,10 +108,12 @@ options:
field must be specified, which must match type field. field must be specified, which must match type field.
- 'Some valid choices include: "TCP", "SSL", "HTTP", "HTTPS"' - 'Some valid choices include: "TCP", "SSL", "HTTP", "HTTPS"'
required: false required: false
type: str
http_health_check: http_health_check:
description: description:
- A nested object resource. - A nested object resource.
required: false required: false
type: dict
suboptions: suboptions:
host: host:
description: description:
@ -113,28 +121,33 @@ options:
- If left empty (default value), the public IP on behalf of which this health - If left empty (default value), the public IP on behalf of which this health
check is performed will be used. check is performed will be used.
required: false required: false
type: str
request_path: request_path:
description: description:
- The request path of the HTTP health check request. - The request path of the HTTP health check request.
- The default value is /. - The default value is /.
required: false required: false
default: "/" default: "/"
type: str
response: response:
description: description:
- The bytes to match against the beginning of the response data. If left empty - The bytes to match against the beginning of the response data. If left empty
(the default value), any response will indicate health. The response data (the default value), any response will indicate health. The response data
can only be ASCII. can only be ASCII.
required: false required: false
type: str
port: port:
description: description:
- The TCP port number for the HTTP health check request. - The TCP port number for the HTTP health check request.
- The default value is 80. - The default value is 80.
required: false required: false
type: int
port_name: port_name:
description: description:
- Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name
are defined, port takes precedence. are defined, port takes precedence.
required: false required: false
type: str
proxy_header: proxy_header:
description: description:
- Specifies the type of proxy header to append before sending data to the - Specifies the type of proxy header to append before sending data to the
@ -142,10 +155,12 @@ options:
- 'Some valid choices include: "NONE", "PROXY_V1"' - 'Some valid choices include: "NONE", "PROXY_V1"'
required: false required: false
default: NONE default: NONE
type: str
https_health_check: https_health_check:
description: description:
- A nested object resource. - A nested object resource.
required: false required: false
type: dict
suboptions: suboptions:
host: host:
description: description:
@ -153,28 +168,33 @@ options:
- If left empty (default value), the public IP on behalf of which this health - If left empty (default value), the public IP on behalf of which this health
check is performed will be used. check is performed will be used.
required: false required: false
type: str
request_path: request_path:
description: description:
- The request path of the HTTPS health check request. - The request path of the HTTPS health check request.
- The default value is /. - The default value is /.
required: false required: false
default: "/" default: "/"
type: str
response: response:
description: description:
- The bytes to match against the beginning of the response data. If left empty - The bytes to match against the beginning of the response data. If left empty
(the default value), any response will indicate health. The response data (the default value), any response will indicate health. The response data
can only be ASCII. can only be ASCII.
required: false required: false
type: str
port: port:
description: description:
- The TCP port number for the HTTPS health check request. - The TCP port number for the HTTPS health check request.
- The default value is 443. - The default value is 443.
required: false required: false
type: int
port_name: port_name:
description: description:
- Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name
are defined, port takes precedence. are defined, port takes precedence.
required: false required: false
type: str
proxy_header: proxy_header:
description: description:
- Specifies the type of proxy header to append before sending data to the - Specifies the type of proxy header to append before sending data to the
@ -182,10 +202,12 @@ options:
- 'Some valid choices include: "NONE", "PROXY_V1"' - 'Some valid choices include: "NONE", "PROXY_V1"'
required: false required: false
default: NONE default: NONE
type: str
tcp_health_check: tcp_health_check:
description: description:
- A nested object resource. - A nested object resource.
required: false required: false
type: dict
suboptions: suboptions:
request: request:
description: description:
@ -193,22 +215,26 @@ options:
(default value is empty). If both request and response are empty, the connection (default value is empty). If both request and response are empty, the connection
establishment alone will indicate health. The request data can only be ASCII. establishment alone will indicate health. The request data can only be ASCII.
required: false required: false
type: str
response: response:
description: description:
- The bytes to match against the beginning of the response data. If left empty - The bytes to match against the beginning of the response data. If left empty
(the default value), any response will indicate health. The response data (the default value), any response will indicate health. The response data
can only be ASCII. can only be ASCII.
required: false required: false
type: str
port: port:
description: description:
- The TCP port number for the TCP health check request. - The TCP port number for the TCP health check request.
- The default value is 443. - The default value is 443.
required: false required: false
type: int
port_name: port_name:
description: description:
- Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name
are defined, port takes precedence. are defined, port takes precedence.
required: false required: false
type: str
proxy_header: proxy_header:
description: description:
- Specifies the type of proxy header to append before sending data to the - Specifies the type of proxy header to append before sending data to the
@ -216,10 +242,12 @@ options:
- 'Some valid choices include: "NONE", "PROXY_V1"' - 'Some valid choices include: "NONE", "PROXY_V1"'
required: false required: false
default: NONE default: NONE
type: str
ssl_health_check: ssl_health_check:
description: description:
- A nested object resource. - A nested object resource.
required: false required: false
type: dict
suboptions: suboptions:
request: request:
description: description:
@ -227,22 +255,26 @@ options:
(default value is empty). If both request and response are empty, the connection (default value is empty). If both request and response are empty, the connection
establishment alone will indicate health. The request data can only be ASCII. establishment alone will indicate health. The request data can only be ASCII.
required: false required: false
type: str
response: response:
description: description:
- The bytes to match against the beginning of the response data. If left empty - The bytes to match against the beginning of the response data. If left empty
(the default value), any response will indicate health. The response data (the default value), any response will indicate health. The response data
can only be ASCII. can only be ASCII.
required: false required: false
type: str
port: port:
description: description:
- The TCP port number for the SSL health check request. - The TCP port number for the SSL health check request.
- The default value is 443. - The default value is 443.
required: false required: false
type: int
port_name: port_name:
description: description:
- Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name - Port name as defined in InstanceGroup#NamedPort#name. If both port and port_name
are defined, port takes precedence. are defined, port takes precedence.
required: false required: false
type: str
proxy_header: proxy_header:
description: description:
- Specifies the type of proxy header to append before sending data to the - Specifies the type of proxy header to append before sending data to the
@ -250,6 +282,7 @@ options:
- 'Some valid choices include: "NONE", "PROXY_V1"' - 'Some valid choices include: "NONE", "PROXY_V1"'
required: false required: false
default: NONE default: NONE
type: str
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
notes: notes:
- 'API Reference: U(https://cloud.google.com/compute/docs/reference/rest/v1/healthChecks)' - 'API Reference: U(https://cloud.google.com/compute/docs/reference/rest/v1/healthChecks)'

@ -53,6 +53,7 @@ options:
- How often (in seconds) to send a health check. The default value is 5 seconds. - How often (in seconds) to send a health check. The default value is 5 seconds.
required: false required: false
default: '5' default: '5'
type: int
aliases: aliases:
- check_interval_seconds - check_interval_seconds
description: description:
@ -60,17 +61,20 @@ options:
- An optional description of this resource. Provide this property when you create - An optional description of this resource. Provide this property when you create
the resource. the resource.
required: false required: false
type: str
healthy_threshold: healthy_threshold:
description: description:
- A so-far unhealthy instance will be marked healthy after this many consecutive - A so-far unhealthy instance will be marked healthy after this many consecutive
successes. The default value is 2. successes. The default value is 2.
required: false required: false
type: int
host: host:
description: description:
- The value of the host header in the HTTP health check request. If left empty - The value of the host header in the HTTP health check request. If left empty
(default value), the public IP on behalf of which this health check is performed (default value), the public IP on behalf of which this health check is performed
will be used. will be used.
required: false required: false
type: str
name: name:
description: description:
- Name of the resource. Provided by the client when the resource is created. The - Name of the resource. Provided by the client when the resource is created. The
@ -80,22 +84,26 @@ options:
characters must be a dash, lowercase letter, or digit, except the last character, characters must be a dash, lowercase letter, or digit, except the last character,
which cannot be a dash. which cannot be a dash.
required: true required: true
type: str
port: port:
description: description:
- The TCP port number for the HTTP health check request. - The TCP port number for the HTTP health check request.
- The default value is 80. - The default value is 80.
required: false required: false
type: int
request_path: request_path:
description: description:
- The request path of the HTTP health check request. - The request path of the HTTP health check request.
- The default value is /. - The default value is /.
required: false required: false
type: str
timeout_sec: timeout_sec:
description: description:
- How long (in seconds) to wait before claiming failure. - How long (in seconds) to wait before claiming failure.
- The default value is 5 seconds. It is invalid for timeoutSec to have greater - The default value is 5 seconds. It is invalid for timeoutSec to have greater
value than checkIntervalSec. value than checkIntervalSec.
required: false required: false
type: int
aliases: aliases:
- timeout_seconds - timeout_seconds
unhealthy_threshold: unhealthy_threshold:
@ -103,6 +111,7 @@ options:
- A so-far healthy instance will be marked unhealthy after this many consecutive - A so-far healthy instance will be marked unhealthy after this many consecutive
failures. The default value is 2. failures. The default value is 2.
required: false required: false
type: int
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
notes: notes:
- 'API Reference: U(https://cloud.google.com/compute/docs/reference/v1/httpHealthChecks)' - 'API Reference: U(https://cloud.google.com/compute/docs/reference/v1/httpHealthChecks)'

@ -52,22 +52,26 @@ options:
description: description:
- How often (in seconds) to send a health check. The default value is 5 seconds. - How often (in seconds) to send a health check. The default value is 5 seconds.
required: false required: false
type: int
description: description:
description: description:
- An optional description of this resource. Provide this property when you create - An optional description of this resource. Provide this property when you create
the resource. the resource.
required: false required: false
type: str
healthy_threshold: healthy_threshold:
description: description:
- A so-far unhealthy instance will be marked healthy after this many consecutive - A so-far unhealthy instance will be marked healthy after this many consecutive
successes. The default value is 2. successes. The default value is 2.
required: false required: false
type: int
host: host:
description: description:
- The value of the host header in the HTTPS health check request. If left empty - The value of the host header in the HTTPS health check request. If left empty
(default value), the public IP on behalf of which this health check is performed (default value), the public IP on behalf of which this health check is performed
will be used. will be used.
required: false required: false
type: str
name: name:
description: description:
- Name of the resource. Provided by the client when the resource is created. The - Name of the resource. Provided by the client when the resource is created. The
@ -77,22 +81,26 @@ options:
characters must be a dash, lowercase letter, or digit, except the last character, characters must be a dash, lowercase letter, or digit, except the last character,
which cannot be a dash. which cannot be a dash.
required: true required: true
type: str
port: port:
description: description:
- The TCP port number for the HTTPS health check request. - The TCP port number for the HTTPS health check request.
- The default value is 80. - The default value is 80.
required: false required: false
type: int
request_path: request_path:
description: description:
- The request path of the HTTPS health check request. - The request path of the HTTPS health check request.
- The default value is /. - The default value is /.
required: false required: false
type: str
timeout_sec: timeout_sec:
description: description:
- How long (in seconds) to wait before claiming failure. - How long (in seconds) to wait before claiming failure.
- The default value is 5 seconds. It is invalid for timeoutSec to have greater - The default value is 5 seconds. It is invalid for timeoutSec to have greater
value than checkIntervalSec. value than checkIntervalSec.
required: false required: false
type: int
aliases: aliases:
- timeout_seconds - timeout_seconds
unhealthy_threshold: unhealthy_threshold:
@ -100,6 +108,7 @@ options:
- A so-far healthy instance will be marked unhealthy after this many consecutive - A so-far healthy instance will be marked unhealthy after this many consecutive
failures. The default value is 2. failures. The default value is 2.
required: false required: false
type: int
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
notes: notes:
- 'API Reference: U(https://cloud.google.com/compute/docs/reference/v1/httpsHealthChecks)' - 'API Reference: U(https://cloud.google.com/compute/docs/reference/v1/httpsHealthChecks)'

@ -62,10 +62,12 @@ options:
- An optional description of this resource. Provide this property when you create - An optional description of this resource. Provide this property when you create
the resource. the resource.
required: false required: false
type: str
disk_size_gb: disk_size_gb:
description: description:
- Size of the image when restored onto a persistent disk (in GB). - Size of the image when restored onto a persistent disk (in GB).
required: false required: false
type: int
family: family:
description: description:
- The name of the image family to which this image belongs. You can create disks - The name of the image family to which this image belongs. You can create disks
@ -73,6 +75,7 @@ options:
always returns its latest image that is not deprecated. The name of the image always returns its latest image that is not deprecated. The name of the image
family must comply with RFC1035. family must comply with RFC1035.
required: false required: false
type: str
guest_os_features: guest_os_features:
description: description:
- A list of features to enable on the guest OS. Applicable for bootable images - A list of features to enable on the guest OS. Applicable for bootable images
@ -84,6 +87,7 @@ options:
WINDOWS, to indicate that this is a Windows image. WINDOWS, to indicate that this is a Windows image.
- This value is purely informational and does not enable or disable any features. - This value is purely informational and does not enable or disable any features.
required: false required: false
type: list
suboptions: suboptions:
type: type:
description: description:
@ -93,27 +97,32 @@ options:
purely informational and does not enable or disable any features. purely informational and does not enable or disable any features.
- 'Some valid choices include: "VIRTIO_SCSI_MULTIQUEUE"' - 'Some valid choices include: "VIRTIO_SCSI_MULTIQUEUE"'
required: false required: false
type: str
image_encryption_key: image_encryption_key:
description: description:
- Encrypts the image using a customer-supplied encryption key. - Encrypts the image using a customer-supplied encryption key.
- After you encrypt an image with a customer-supplied key, you must provide the - After you encrypt an image with a customer-supplied key, you must provide the
same key if you use the image later (e.g. to create a disk from the image) . same key if you use the image later (e.g. to create a disk from the image) .
required: false required: false
type: dict
suboptions: suboptions:
raw_key: raw_key:
description: description:
- Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648
base64 to either encrypt or decrypt this resource. base64 to either encrypt or decrypt this resource.
required: false required: false
type: str
labels: labels:
description: description:
- Labels to apply to this Image. - Labels to apply to this Image.
required: false required: false
type: dict
version_added: 2.8 version_added: 2.8
licenses: licenses:
description: description:
- Any applicable license URI. - Any applicable license URI.
required: false required: false
type: list
name: name:
description: description:
- Name of the resource; provided by the client when the resource is created. The - Name of the resource; provided by the client when the resource is created. The
@ -123,10 +132,12 @@ options:
characters must be a dash, lowercase letter, or digit, except the last character, characters must be a dash, lowercase letter, or digit, except the last character,
which cannot be a dash. which cannot be a dash.
required: true required: true
type: str
raw_disk: raw_disk:
description: description:
- The parameters of the raw disk image. - The parameters of the raw disk image.
required: false required: false
type: dict
suboptions: suboptions:
container_type: container_type:
description: description:
@ -135,16 +146,19 @@ options:
format. Provided by the client when the disk image is created. format. Provided by the client when the disk image is created.
- 'Some valid choices include: "TAR"' - 'Some valid choices include: "TAR"'
required: false required: false
type: str
sha1_checksum: sha1_checksum:
description: description:
- An optional SHA1 checksum of the disk image before unpackaging. - An optional SHA1 checksum of the disk image before unpackaging.
- This is provided by the client when the disk image is created. - This is provided by the client when the disk image is created.
required: false required: false
type: str
source: source:
description: description:
- The full Google Cloud Storage URL where disk storage is stored You must - The full Google Cloud Storage URL where disk storage is stored You must
provide either this property or the sourceDisk property but not both. provide either this property or the sourceDisk property but not both.
required: true required: true
type: str
source_disk: source_disk:
description: description:
- The source disk to create this image based on. - The source disk to create this image based on.
@ -156,29 +170,34 @@ options:
to a gcp_compute_disk task and then set this source_disk field to "{{ name-of-resource to a gcp_compute_disk task and then set this source_disk field to "{{ name-of-resource
}}"' }}"'
required: false required: false
type: dict
source_disk_encryption_key: source_disk_encryption_key:
description: description:
- The customer-supplied encryption key of the source disk. Required if the source - The customer-supplied encryption key of the source disk. Required if the source
disk is protected by a customer-supplied encryption key. disk is protected by a customer-supplied encryption key.
required: false required: false
type: dict
suboptions: suboptions:
raw_key: raw_key:
description: description:
- Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648
base64 to either encrypt or decrypt this resource. base64 to either encrypt or decrypt this resource.
required: false required: false
type: str
source_disk_id: source_disk_id:
description: description:
- The ID value of the disk used to create this image. This value may be used to - The ID value of the disk used to create this image. This value may be used to
determine whether the image was taken from the current or a previous instance determine whether the image was taken from the current or a previous instance
of a given disk name. of a given disk name.
required: false required: false
type: str
source_type: source_type:
description: description:
- The type of the image used to create this disk. The default and only value is - The type of the image used to create this disk. The default and only value is
RAW . RAW .
- 'Some valid choices include: "RAW"' - 'Some valid choices include: "RAW"'
required: false required: false
type: str
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
notes: notes:
- 'API Reference: U(https://cloud.google.com/compute/docs/reference/v1/images)' - 'API Reference: U(https://cloud.google.com/compute/docs/reference/v1/images)'

@ -61,6 +61,7 @@ options:
- An array of disks that are associated with the instances that are created from - An array of disks that are associated with the instances that are created from
this template. this template.
required: false required: false
type: list
suboptions: suboptions:
auto_delete: auto_delete:
description: description:
@ -83,21 +84,25 @@ options:
the instance. This name can be used to reference the device for mounting, the instance. This name can be used to reference the device for mounting,
resizing, and so on, from within the instance. resizing, and so on, from within the instance.
required: false required: false
type: str
disk_encryption_key: disk_encryption_key:
description: description:
- Encrypts or decrypts a disk using a customer-supplied encryption key. - Encrypts or decrypts a disk using a customer-supplied encryption key.
required: false required: false
type: dict
suboptions: suboptions:
raw_key: raw_key:
description: description:
- Specifies a 256-bit customer-supplied encryption key, encoded in RFC - Specifies a 256-bit customer-supplied encryption key, encoded in RFC
4648 base64 to either encrypt or decrypt this resource. 4648 base64 to either encrypt or decrypt this resource.
required: false required: false
type: str
rsa_encrypted_key: rsa_encrypted_key:
description: description:
- Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied - Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied
encryption key to either encrypt or decrypt this resource. encryption key to either encrypt or decrypt this resource.
required: false required: false
type: str
index: index:
description: description:
- Assigns a zero-based index to this disk, where 0 is reserved for the boot - Assigns a zero-based index to this disk, where 0 is reserved for the boot
@ -105,28 +110,33 @@ options:
disk would have a unique index number. If not specified, the server will disk would have a unique index number. If not specified, the server will
choose an appropriate value. choose an appropriate value.
required: false required: false
type: int
initialize_params: initialize_params:
description: description:
- Specifies the parameters for a new disk that will be created alongside the - Specifies the parameters for a new disk that will be created alongside the
new instance. Use initialization parameters to create boot disks or local new instance. Use initialization parameters to create boot disks or local
SSDs attached to the new instance. SSDs attached to the new instance.
required: false required: false
type: dict
suboptions: suboptions:
disk_name: disk_name:
description: description:
- Specifies the disk name. If not specified, the default is to use the - Specifies the disk name. If not specified, the default is to use the
name of the instance. name of the instance.
required: false required: false
type: str
disk_size_gb: disk_size_gb:
description: description:
- Specifies the size of the disk in base-2 GB. - Specifies the size of the disk in base-2 GB.
required: false required: false
type: int
disk_type: disk_type:
description: description:
- Reference to a disk type. - Reference to a disk type.
- Specifies the disk type to use to create the instance. - Specifies the disk type to use to create the instance.
- If not specified, the default is pd-standard. - If not specified, the default is pd-standard.
required: false required: false
type: str
source_image: source_image:
description: description:
- The source image to create this disk. When creating a new instance, - The source image to create this disk. When creating a new instance,
@ -134,6 +144,7 @@ options:
create a disk with one of the public operating system images, specify create a disk with one of the public operating system images, specify
the image by its family name. the image by its family name.
required: false required: false
type: str
aliases: aliases:
- image - image
- image_family - image_family
@ -145,12 +156,14 @@ options:
you cannot create disks for instances in a managed instance group if you cannot create disks for instances in a managed instance group if
the source images are encrypted with your own keys. the source images are encrypted with your own keys.
required: false required: false
type: dict
suboptions: suboptions:
raw_key: raw_key:
description: description:
- Specifies a 256-bit customer-supplied encryption key, encoded in - Specifies a 256-bit customer-supplied encryption key, encoded in
RFC 4648 base64 to either encrypt or decrypt this resource. RFC 4648 base64 to either encrypt or decrypt this resource.
required: false required: false
type: str
interface: interface:
description: description:
- Specifies the disk interface to use for attaching this disk, which is either - Specifies the disk interface to use for attaching this disk, which is either
@ -159,12 +172,14 @@ options:
to attach a persistent disk in any other format than SCSI. to attach a persistent disk in any other format than SCSI.
- 'Some valid choices include: "SCSI", "NVME"' - 'Some valid choices include: "SCSI", "NVME"'
required: false required: false
type: str
mode: mode:
description: description:
- The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If - The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If
not specified, the default is to attach the disk in READ_WRITE mode. not specified, the default is to attach the disk in READ_WRITE mode.
- 'Some valid choices include: "READ_WRITE", "READ_ONLY"' - 'Some valid choices include: "READ_WRITE", "READ_ONLY"'
required: false required: false
type: str
source: source:
description: description:
- Reference to a disk. When creating a new instance, one of initializeParams.sourceImage - Reference to a disk. When creating a new instance, one of initializeParams.sourceImage
@ -177,44 +192,53 @@ options:
name-of-resource` to a gcp_compute_disk task and then set this source field name-of-resource` to a gcp_compute_disk task and then set this source field
to "{{ name-of-resource }}"' to "{{ name-of-resource }}"'
required: false required: false
type: dict
type: type:
description: description:
- Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, - Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified,
the default is PERSISTENT. the default is PERSISTENT.
- 'Some valid choices include: "SCRATCH", "PERSISTENT"' - 'Some valid choices include: "SCRATCH", "PERSISTENT"'
required: false required: false
type: str
guest_accelerators: guest_accelerators:
description: description:
- List of the type and count of accelerator cards attached to the instance . - List of the type and count of accelerator cards attached to the instance .
required: false required: false
type: list
suboptions: suboptions:
accelerator_count: accelerator_count:
description: description:
- The number of the guest accelerator cards exposed to this instance. - The number of the guest accelerator cards exposed to this instance.
required: false required: false
type: int
accelerator_type: accelerator_type:
description: description:
- Full or partial URL of the accelerator type resource to expose to this instance. - Full or partial URL of the accelerator type resource to expose to this instance.
required: false required: false
type: str
labels: labels:
description: description:
- Labels to apply to this instance. A list of key->value pairs. - Labels to apply to this instance. A list of key->value pairs.
required: false required: false
type: dict
version_added: 2.9 version_added: 2.9
metadata: metadata:
description: description:
- The metadata key/value pairs to assign to instances that are created from this - The metadata key/value pairs to assign to instances that are created from this
template. These pairs can consist of custom metadata or predefined keys. template. These pairs can consist of custom metadata or predefined keys.
required: false required: false
type: dict
machine_type: machine_type:
description: description:
- A reference to a machine type which defines VM kind. - A reference to a machine type which defines VM kind.
required: false required: false
type: str
min_cpu_platform: min_cpu_platform:
description: description:
- Specifies a minimum CPU platform for the VM instance. Applicable values are - Specifies a minimum CPU platform for the VM instance. Applicable values are
the friendly names of CPU platforms . the friendly names of CPU platforms .
required: false required: false
type: str
name: name:
description: description:
- The name of the resource, provided by the client when initially creating the - The name of the resource, provided by the client when initially creating the
@ -224,12 +248,14 @@ options:
letter, and all following characters must be a dash, lowercase letter, or digit, letter, and all following characters must be a dash, lowercase letter, or digit,
except the last character, which cannot be a dash. except the last character, which cannot be a dash.
required: false required: false
type: str
network_interfaces: network_interfaces:
description: description:
- An array of configurations for this interface. This specifies how this interface - An array of configurations for this interface. This specifies how this interface
is configured to interact with other network services, such as connecting to is configured to interact with other network services, such as connecting to
the internet. Only one network interface is supported per instance. the internet. Only one network interface is supported per instance.
required: false required: false
type: list
suboptions: suboptions:
access_configs: access_configs:
description: description:
@ -237,6 +263,7 @@ options:
config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified, config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs specified,
then this instance will have no external internet access. then this instance will have no external internet access.
required: false required: false
type: list
suboptions: suboptions:
name: name:
description: description:
@ -244,6 +271,7 @@ options:
is External NAT but you can use any arbitrary string you would like. is External NAT but you can use any arbitrary string you would like.
For example, My external IP or Network Access. For example, My external IP or Network Access.
required: true required: true
type: str
nat_ip: nat_ip:
description: description:
- Reference to an address. - Reference to an address.
@ -258,16 +286,19 @@ options:
name-of-resource` to a gcp_compute_address task and then set this nat_ip name-of-resource` to a gcp_compute_address task and then set this nat_ip
field to "{{ name-of-resource }}"' field to "{{ name-of-resource }}"'
required: false required: false
type: dict
type: type:
description: description:
- The type of configuration. The default and only option is ONE_TO_ONE_NAT. - The type of configuration. The default and only option is ONE_TO_ONE_NAT.
- 'Some valid choices include: "ONE_TO_ONE_NAT"' - 'Some valid choices include: "ONE_TO_ONE_NAT"'
required: true required: true
type: str
alias_ip_ranges: alias_ip_ranges:
description: description:
- An array of alias IP ranges for this network interface. Can only be specified - An array of alias IP ranges for this network interface. Can only be specified
for network interfaces on subnet-mode networks. for network interfaces on subnet-mode networks.
required: false required: false
type: list
suboptions: suboptions:
ip_cidr_range: ip_cidr_range:
description: description:
@ -277,12 +308,14 @@ options:
This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g.
/24) or a CIDR format string (e.g. 10.1.2.0/24). /24) or a CIDR format string (e.g. 10.1.2.0/24).
required: false required: false
type: str
subnetwork_range_name: subnetwork_range_name:
description: description:
- Optional subnetwork secondary range name specifying the secondary range - Optional subnetwork secondary range name specifying the secondary range
from which to allocate the IP CIDR range for this alias IP range. If from which to allocate the IP CIDR range for this alias IP range. If
left unspecified, the primary range of the subnetwork will be used. left unspecified, the primary range of the subnetwork will be used.
required: false required: false
type: str
network: network:
description: description:
- Specifies the title of an existing network. When creating an instance, if - Specifies the title of an existing network. When creating an instance, if
@ -295,12 +328,14 @@ options:
name-of-resource` to a gcp_compute_network task and then set this network name-of-resource` to a gcp_compute_network task and then set this network
field to "{{ name-of-resource }}"' field to "{{ name-of-resource }}"'
required: false required: false
type: dict
network_ip: network_ip:
description: description:
- An IPv4 internal network address to assign to the instance for this network - An IPv4 internal network address to assign to the instance for this network
interface. If not specified by the user, an unused internal IP is assigned interface. If not specified by the user, an unused internal IP is assigned
by the system. by the system.
required: false required: false
type: str
subnetwork: subnetwork:
description: description:
- Reference to a VPC network. - Reference to a VPC network.
@ -313,10 +348,12 @@ options:
name-of-resource` to a gcp_compute_subnetwork task and then set this subnetwork name-of-resource` to a gcp_compute_subnetwork task and then set this subnetwork
field to "{{ name-of-resource }}"' field to "{{ name-of-resource }}"'
required: false required: false
type: dict
scheduling: scheduling:
description: description:
- Sets the scheduling options for this instance. - Sets the scheduling options for this instance.
required: false required: false
type: dict
suboptions: suboptions:
automatic_restart: automatic_restart:
description: description:
@ -333,6 +370,7 @@ options:
and only possible behavior is TERMINATE. and only possible behavior is TERMINATE.
- For more information, see Setting Instance Scheduling Options. - For more information, see Setting Instance Scheduling Options.
required: false required: false
type: str
preemptible: preemptible:
description: description:
- Defines whether the instance is preemptible. This can only be set during - Defines whether the instance is preemptible. This can only be set during
@ -345,15 +383,18 @@ options:
- A list of service accounts, with their specified scopes, authorized for this - A list of service accounts, with their specified scopes, authorized for this
instance. Only one service account per VM instance is supported. instance. Only one service account per VM instance is supported.
required: false required: false
type: list
suboptions: suboptions:
email: email:
description: description:
- Email address of the service account. - Email address of the service account.
required: false required: false
type: str
scopes: scopes:
description: description:
- The list of scopes to be made available for this service account. - The list of scopes to be made available for this service account.
required: false required: false
type: list
status: status:
description: description:
- 'The status of the instance. One of the following values: PROVISIONING, STAGING, - 'The status of the instance. One of the following values: PROVISIONING, STAGING,
@ -363,6 +404,7 @@ options:
- 'Some valid choices include: "PROVISIONING", "STAGING", "RUNNING", "STOPPING", - 'Some valid choices include: "PROVISIONING", "STAGING", "RUNNING", "STOPPING",
"SUSPENDING", "SUSPENDED", "TERMINATED"' "SUSPENDING", "SUSPENDED", "TERMINATED"'
required: false required: false
type: str
version_added: 2.8 version_added: 2.8
tags: tags:
description: description:
@ -371,6 +413,7 @@ options:
creation. The tags can be later modified by the setTags method. Each tag within creation. The tags can be later modified by the setTags method. Each tag within
the list must comply with RFC1035. the list must comply with RFC1035.
required: false required: false
type: dict
suboptions: suboptions:
fingerprint: fingerprint:
description: description:
@ -380,15 +423,18 @@ options:
every request to modify or update metadata. You must always provide an up-to-date every request to modify or update metadata. You must always provide an up-to-date
fingerprint hash in order to update or change metadata. fingerprint hash in order to update or change metadata.
required: false required: false
type: str
items: items:
description: description:
- An array of tags. Each tag must be 1-63 characters long, and comply with - An array of tags. Each tag must be 1-63 characters long, and comply with
RFC1035. RFC1035.
required: false required: false
type: list
zone: zone:
description: description:
- A reference to the zone where the machine resides. - A reference to the zone where the machine resides.
required: true required: true
type: str
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
''' '''
@ -1139,7 +1185,7 @@ def wait_for_operation(module, response):
return {} return {}
status = navigate_hash(op_result, ['status']) status = navigate_hash(op_result, ['status'])
wait_done = wait_for_completion(status, op_result, module) wait_done = wait_for_completion(status, op_result, module)
return fetch_resource(module, navigate_hash(wait_done, ['targetLink']), 'compute#instance') return decode_response(fetch_resource(module, navigate_hash(wait_done, ['targetLink']), 'compute#instance'), module)
def wait_for_completion(status, op_result, module): def wait_for_completion(status, op_result, module):

@ -49,6 +49,7 @@ options:
description: description:
- A reference to the zone where the machine resides. - A reference to the zone where the machine resides.
required: true required: true
type: str
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
''' '''

@ -55,11 +55,13 @@ options:
- An optional description of this resource. Provide this property when you create - An optional description of this resource. Provide this property when you create
the resource. the resource.
required: false required: false
type: str
name: name:
description: description:
- The name of the instance group. - The name of the instance group.
- The name must be 1-63 characters long, and comply with RFC1035. - The name must be 1-63 characters long, and comply with RFC1035.
required: false required: false
type: str
named_ports: named_ports:
description: description:
- Assigns a name to a port number. - Assigns a name to a port number.
@ -69,16 +71,19 @@ options:
- 'For example: [{name: "http", port: 80},{name: "http", port: 8080}] Named ports - 'For example: [{name: "http", port: 80},{name: "http", port: 8080}] Named ports
apply to all instances in this instance group.' apply to all instances in this instance group.'
required: false required: false
type: list
suboptions: suboptions:
name: name:
description: description:
- The name for this named port. - The name for this named port.
- The name must be 1-63 characters long, and comply with RFC1035. - The name must be 1-63 characters long, and comply with RFC1035.
required: false required: false
type: str
port: port:
description: description:
- The port number, which can be a value between 1 and 65535. - The port number, which can be a value between 1 and 65535.
required: false required: false
type: int
network: network:
description: description:
- The network to which all instances in the instance group belong. - The network to which all instances in the instance group belong.
@ -88,10 +93,12 @@ options:
to a gcp_compute_network task and then set this network field to "{{ name-of-resource to a gcp_compute_network task and then set this network field to "{{ name-of-resource
}}"' }}"'
required: false required: false
type: dict
region: region:
description: description:
- The region where the instance group is located (for regional resources). - The region where the instance group is located (for regional resources).
required: false required: false
type: str
subnetwork: subnetwork:
description: description:
- The subnetwork to which all instances in the instance group belong. - The subnetwork to which all instances in the instance group belong.
@ -101,10 +108,12 @@ options:
to a gcp_compute_subnetwork task and then set this subnetwork field to "{{ name-of-resource to a gcp_compute_subnetwork task and then set this subnetwork field to "{{ name-of-resource
}}"' }}"'
required: false required: false
type: dict
zone: zone:
description: description:
- A reference to the zone where the instance group resides. - A reference to the zone where the instance group resides.
required: true required: true
type: str
instances: instances:
description: description:
- The list of instances associated with this InstanceGroup. - The list of instances associated with this InstanceGroup.
@ -113,6 +122,7 @@ options:
not be deleted. not be deleted.
- Only the full identifier of the instance will be returned. - Only the full identifier of the instance will be returned.
required: false required: false
type: list
version_added: 2.8 version_added: 2.8
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
''' '''

@ -49,6 +49,7 @@ options:
description: description:
- A reference to the zone where the instance group resides. - A reference to the zone where the instance group resides.
required: true required: true
type: str
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
''' '''

@ -59,11 +59,13 @@ options:
four-character string to the base instance name. four-character string to the base instance name.
- The base instance name must comply with RFC1035. - The base instance name must comply with RFC1035.
required: true required: true
type: str
description: description:
description: description:
- An optional description of this resource. Provide this property when you create - An optional description of this resource. Provide this property when you create
the resource. the resource.
required: false required: false
type: str
instance_template: instance_template:
description: description:
- The instance template that is specified for this managed instance group. The - The instance template that is specified for this managed instance group. The
@ -75,42 +77,50 @@ options:
name-of-resource` to a gcp_compute_instance_template task and then set this name-of-resource` to a gcp_compute_instance_template task and then set this
instance_template field to "{{ name-of-resource }}"' instance_template field to "{{ name-of-resource }}"'
required: true required: true
type: dict
name: name:
description: description:
- The name of the managed instance group. The name must be 1-63 characters long, - The name of the managed instance group. The name must be 1-63 characters long,
and comply with RFC1035. and comply with RFC1035.
required: true required: true
type: str
named_ports: named_ports:
description: description:
- Named ports configured for the Instance Groups complementary to this Instance - Named ports configured for the Instance Groups complementary to this Instance
Group Manager. Group Manager.
required: false required: false
type: list
suboptions: suboptions:
name: name:
description: description:
- The name for this named port. The name must be 1-63 characters long, and - The name for this named port. The name must be 1-63 characters long, and
comply with RFC1035. comply with RFC1035.
required: false required: false
type: str
port: port:
description: description:
- The port number, which can be a value between 1 and 65535. - The port number, which can be a value between 1 and 65535.
required: false required: false
type: int
target_pools: target_pools:
description: description:
- TargetPool resources to which instances in the instanceGroup field are added. - TargetPool resources to which instances in the instanceGroup field are added.
The target pools automatically apply to all of the instances in the managed The target pools automatically apply to all of the instances in the managed
instance group. instance group.
required: false required: false
type: list
target_size: target_size:
description: description:
- The target number of running instances for this managed instance group. Deleting - The target number of running instances for this managed instance group. Deleting
or abandoning instances reduces this number. Resizing the group changes this or abandoning instances reduces this number. Resizing the group changes this
number. number.
required: false required: false
type: int
zone: zone:
description: description:
- The zone the managed instance group resides. - The zone the managed instance group resides.
required: true required: true
type: str
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
''' '''

@ -49,6 +49,7 @@ options:
description: description:
- The zone the managed instance group resides. - The zone the managed instance group resides.
required: true required: true
type: str
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
''' '''

@ -58,14 +58,17 @@ options:
- An optional description of this resource. Provide this property when you create - An optional description of this resource. Provide this property when you create
the resource. the resource.
required: false required: false
type: str
name: name:
description: description:
- Name of the resource. The name is 1-63 characters long and complies with RFC1035. - Name of the resource. The name is 1-63 characters long and complies with RFC1035.
required: true required: true
type: str
properties: properties:
description: description:
- The instance properties for this instance template. - The instance properties for this instance template.
required: false required: false
type: dict
suboptions: suboptions:
can_ip_forward: can_ip_forward:
description: description:
@ -81,11 +84,13 @@ options:
- An optional text description for the instances that are created from this - An optional text description for the instances that are created from this
instance template. instance template.
required: false required: false
type: str
disks: disks:
description: description:
- An array of disks that are associated with the instances that are created - An array of disks that are associated with the instances that are created
from this template. from this template.
required: false required: false
type: list
suboptions: suboptions:
auto_delete: auto_delete:
description: description:
@ -108,21 +113,25 @@ options:
within the instance. This name can be used to reference the device for within the instance. This name can be used to reference the device for
mounting, resizing, and so on, from within the instance. mounting, resizing, and so on, from within the instance.
required: false required: false
type: str
disk_encryption_key: disk_encryption_key:
description: description:
- Encrypts or decrypts a disk using a customer-supplied encryption key. - Encrypts or decrypts a disk using a customer-supplied encryption key.
required: false required: false
type: dict
suboptions: suboptions:
raw_key: raw_key:
description: description:
- Specifies a 256-bit customer-supplied encryption key, encoded in - Specifies a 256-bit customer-supplied encryption key, encoded in
RFC 4648 base64 to either encrypt or decrypt this resource. RFC 4648 base64 to either encrypt or decrypt this resource.
required: false required: false
type: str
rsa_encrypted_key: rsa_encrypted_key:
description: description:
- Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied - Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied
encryption key to either encrypt or decrypt this resource. encryption key to either encrypt or decrypt this resource.
required: false required: false
type: str
index: index:
description: description:
- Assigns a zero-based index to this disk, where 0 is reserved for the - Assigns a zero-based index to this disk, where 0 is reserved for the
@ -130,28 +139,33 @@ options:
each disk would have a unique index number. If not specified, the server each disk would have a unique index number. If not specified, the server
will choose an appropriate value. will choose an appropriate value.
required: false required: false
type: int
initialize_params: initialize_params:
description: description:
- Specifies the parameters for a new disk that will be created alongside - Specifies the parameters for a new disk that will be created alongside
the new instance. Use initialization parameters to create boot disks the new instance. Use initialization parameters to create boot disks
or local SSDs attached to the new instance. or local SSDs attached to the new instance.
required: false required: false
type: dict
suboptions: suboptions:
disk_name: disk_name:
description: description:
- Specifies the disk name. If not specified, the default is to use - Specifies the disk name. If not specified, the default is to use
the name of the instance. the name of the instance.
required: false required: false
type: str
disk_size_gb: disk_size_gb:
description: description:
- Specifies the size of the disk in base-2 GB. - Specifies the size of the disk in base-2 GB.
required: false required: false
type: int
disk_type: disk_type:
description: description:
- Reference to a disk type. - Reference to a disk type.
- Specifies the disk type to use to create the instance. - Specifies the disk type to use to create the instance.
- If not specified, the default is pd-standard. - If not specified, the default is pd-standard.
required: false required: false
type: str
source_image: source_image:
description: description:
- The source image to create this disk. When creating a new instance, - The source image to create this disk. When creating a new instance,
@ -159,6 +173,7 @@ options:
To create a disk with one of the public operating system images, To create a disk with one of the public operating system images,
specify the image by its family name. specify the image by its family name.
required: false required: false
type: str
source_image_encryption_key: source_image_encryption_key:
description: description:
- The customer-supplied encryption key of the source image. Required - The customer-supplied encryption key of the source image. Required
@ -168,12 +183,14 @@ options:
so you cannot create disks for instances in a managed instance group so you cannot create disks for instances in a managed instance group
if the source images are encrypted with your own keys. if the source images are encrypted with your own keys.
required: false required: false
type: dict
suboptions: suboptions:
raw_key: raw_key:
description: description:
- Specifies a 256-bit customer-supplied encryption key, encoded - Specifies a 256-bit customer-supplied encryption key, encoded
in RFC 4648 base64 to either encrypt or decrypt this resource. in RFC 4648 base64 to either encrypt or decrypt this resource.
required: false required: false
type: str
interface: interface:
description: description:
- Specifies the disk interface to use for attaching this disk, which is - Specifies the disk interface to use for attaching this disk, which is
@ -182,12 +199,14 @@ options:
attempt to attach a persistent disk in any other format than SCSI. attempt to attach a persistent disk in any other format than SCSI.
- 'Some valid choices include: "SCSI", "NVME"' - 'Some valid choices include: "SCSI", "NVME"'
required: false required: false
type: str
mode: mode:
description: description:
- The mode in which to attach this disk, either READ_WRITE or READ_ONLY. - The mode in which to attach this disk, either READ_WRITE or READ_ONLY.
If not specified, the default is to attach the disk in READ_WRITE mode. If not specified, the default is to attach the disk in READ_WRITE mode.
- 'Some valid choices include: "READ_WRITE", "READ_ONLY"' - 'Some valid choices include: "READ_WRITE", "READ_ONLY"'
required: false required: false
type: str
source: source:
description: description:
- Reference to a disk. When creating a new instance, one of initializeParams.sourceImage - Reference to a disk. When creating a new instance, one of initializeParams.sourceImage
@ -202,48 +221,57 @@ options:
name-of-resource` to a gcp_compute_disk task and then set this source name-of-resource` to a gcp_compute_disk task and then set this source
field to "{{ name-of-resource }}"' field to "{{ name-of-resource }}"'
required: false required: false
type: dict
type: type:
description: description:
- Specifies the type of the disk, either SCRATCH or PERSISTENT. If not - Specifies the type of the disk, either SCRATCH or PERSISTENT. If not
specified, the default is PERSISTENT. specified, the default is PERSISTENT.
- 'Some valid choices include: "SCRATCH", "PERSISTENT"' - 'Some valid choices include: "SCRATCH", "PERSISTENT"'
required: false required: false
type: str
machine_type: machine_type:
description: description:
- The machine type to use in the VM instance template. - The machine type to use in the VM instance template.
required: true required: true
type: str
min_cpu_platform: min_cpu_platform:
description: description:
- Specifies a minimum CPU platform for the VM instance. Applicable values - Specifies a minimum CPU platform for the VM instance. Applicable values
are the friendly names of CPU platforms . are the friendly names of CPU platforms .
required: false required: false
type: str
metadata: metadata:
description: description:
- The metadata key/value pairs to assign to instances that are created from - The metadata key/value pairs to assign to instances that are created from
this template. These pairs can consist of custom metadata or predefined this template. These pairs can consist of custom metadata or predefined
keys. keys.
required: false required: false
type: dict
guest_accelerators: guest_accelerators:
description: description:
- List of the type and count of accelerator cards attached to the instance - List of the type and count of accelerator cards attached to the instance
. .
required: false required: false
type: list
suboptions: suboptions:
accelerator_count: accelerator_count:
description: description:
- The number of the guest accelerator cards exposed to this instance. - The number of the guest accelerator cards exposed to this instance.
required: false required: false
type: int
accelerator_type: accelerator_type:
description: description:
- Full or partial URL of the accelerator type resource to expose to this - Full or partial URL of the accelerator type resource to expose to this
instance. instance.
required: false required: false
type: str
network_interfaces: network_interfaces:
description: description:
- An array of configurations for this interface. This specifies how this interface - An array of configurations for this interface. This specifies how this interface
is configured to interact with other network services, such as connecting is configured to interact with other network services, such as connecting
to the internet. Only one network interface is supported per instance. to the internet. Only one network interface is supported per instance.
required: false required: false
type: list
suboptions: suboptions:
access_configs: access_configs:
description: description:
@ -251,6 +279,7 @@ options:
config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs config, ONE_TO_ONE_NAT, is supported. If there are no accessConfigs
specified, then this instance will have no external internet access. specified, then this instance will have no external internet access.
required: false required: false
type: list
suboptions: suboptions:
name: name:
description: description:
@ -258,6 +287,7 @@ options:
name is External NAT but you can use any arbitrary string you would name is External NAT but you can use any arbitrary string you would
like. For example, My external IP or Network Access. like. For example, My external IP or Network Access.
required: true required: true
type: str
nat_ip: nat_ip:
description: description:
- Reference to an address. - Reference to an address.
@ -272,16 +302,19 @@ options:
you can add `register: name-of-resource` to a gcp_compute_address you can add `register: name-of-resource` to a gcp_compute_address
task and then set this nat_ip field to "{{ name-of-resource }}"' task and then set this nat_ip field to "{{ name-of-resource }}"'
required: false required: false
type: dict
type: type:
description: description:
- The type of configuration. The default and only option is ONE_TO_ONE_NAT. - The type of configuration. The default and only option is ONE_TO_ONE_NAT.
- 'Some valid choices include: "ONE_TO_ONE_NAT"' - 'Some valid choices include: "ONE_TO_ONE_NAT"'
required: true required: true
type: str
alias_ip_ranges: alias_ip_ranges:
description: description:
- An array of alias IP ranges for this network interface. Can only be - An array of alias IP ranges for this network interface. Can only be
specified for network interfaces on subnet-mode networks. specified for network interfaces on subnet-mode networks.
required: false required: false
type: list
suboptions: suboptions:
ip_cidr_range: ip_cidr_range:
description: description:
@ -291,6 +324,7 @@ options:
interfaces. This range may be a single IP address (e.g. 10.2.3.4), interfaces. This range may be a single IP address (e.g. 10.2.3.4),
a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24). a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24).
required: false required: false
type: str
subnetwork_range_name: subnetwork_range_name:
description: description:
- Optional subnetwork secondary range name specifying the secondary - Optional subnetwork secondary range name specifying the secondary
@ -298,6 +332,7 @@ options:
range. If left unspecified, the primary range of the subnetwork range. If left unspecified, the primary range of the subnetwork
will be used. will be used.
required: false required: false
type: str
network: network:
description: description:
- Specifies the title of an existing network. When creating an instance, - Specifies the title of an existing network. When creating an instance,
@ -310,12 +345,14 @@ options:
name-of-resource` to a gcp_compute_network task and then set this network name-of-resource` to a gcp_compute_network task and then set this network
field to "{{ name-of-resource }}"' field to "{{ name-of-resource }}"'
required: false required: false
type: dict
network_ip: network_ip:
description: description:
- An IPv4 internal network address to assign to the instance for this - An IPv4 internal network address to assign to the instance for this
network interface. If not specified by the user, an unused internal network interface. If not specified by the user, an unused internal
IP is assigned by the system. IP is assigned by the system.
required: false required: false
type: str
subnetwork: subnetwork:
description: description:
- Reference to a VPC network. - Reference to a VPC network.
@ -328,10 +365,12 @@ options:
can add `register: name-of-resource` to a gcp_compute_subnetwork task can add `register: name-of-resource` to a gcp_compute_subnetwork task
and then set this subnetwork field to "{{ name-of-resource }}"' and then set this subnetwork field to "{{ name-of-resource }}"'
required: false required: false
type: dict
scheduling: scheduling:
description: description:
- Sets the scheduling options for this instance. - Sets the scheduling options for this instance.
required: false required: false
type: dict
suboptions: suboptions:
automatic_restart: automatic_restart:
description: description:
@ -348,6 +387,7 @@ options:
and only possible behavior is TERMINATE. and only possible behavior is TERMINATE.
- For more information, see Setting Instance Scheduling Options. - For more information, see Setting Instance Scheduling Options.
required: false required: false
type: str
preemptible: preemptible:
description: description:
- Defines whether the instance is preemptible. This can only be set during - Defines whether the instance is preemptible. This can only be set during
@ -360,15 +400,18 @@ options:
- A list of service accounts, with their specified scopes, authorized for - A list of service accounts, with their specified scopes, authorized for
this instance. Only one service account per VM instance is supported. this instance. Only one service account per VM instance is supported.
required: false required: false
type: list
suboptions: suboptions:
email: email:
description: description:
- Email address of the service account. - Email address of the service account.
required: false required: false
type: str
scopes: scopes:
description: description:
- The list of scopes to be made available for this service account. - The list of scopes to be made available for this service account.
required: false required: false
type: list
tags: tags:
description: description:
- A list of tags to apply to this instance. Tags are used to identify valid - A list of tags to apply to this instance. Tags are used to identify valid
@ -376,6 +419,7 @@ options:
during instance creation. The tags can be later modified by the setTags during instance creation. The tags can be later modified by the setTags
method. Each tag within the list must comply with RFC1035. method. Each tag within the list must comply with RFC1035.
required: false required: false
type: dict
suboptions: suboptions:
fingerprint: fingerprint:
description: description:
@ -385,11 +429,13 @@ options:
after every request to modify or update metadata. You must always provide after every request to modify or update metadata. You must always provide
an up-to-date fingerprint hash in order to update or change metadata. an up-to-date fingerprint hash in order to update or change metadata.
required: false required: false
type: str
items: items:
description: description:
- An array of tags. Each tag must be 1-63 characters long, and comply - An array of tags. Each tag must be 1-63 characters long, and comply
with RFC1035. with RFC1035.
required: false required: false
type: list
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
''' '''
@ -1058,7 +1104,7 @@ def wait_for_operation(module, response):
return {} return {}
status = navigate_hash(op_result, ['status']) status = navigate_hash(op_result, ['status'])
wait_done = wait_for_completion(status, op_result, module) wait_done = wait_for_completion(status, op_result, module)
return fetch_resource(module, navigate_hash(wait_done, ['targetLink']), 'compute#instanceTemplate') return decode_response(fetch_resource(module, navigate_hash(wait_done, ['targetLink']), 'compute#instanceTemplate'), module)
def wait_for_completion(status, op_result, module): def wait_for_completion(status, op_result, module):

@ -54,10 +54,12 @@ options:
traverse through. Required if type is DEDICATED, must not be set if type is traverse through. Required if type is DEDICATED, must not be set if type is
PARTNER. PARTNER.
required: false required: false
type: str
description: description:
description: description:
- An optional description of this resource. - An optional description of this resource.
required: false required: false
type: str
edge_availability_domain: edge_availability_domain:
description: description:
- Desired availability domain for the attachment. Only available for type PARTNER, - Desired availability domain for the attachment. Only available for type PARTNER,
@ -67,11 +69,13 @@ options:
circuit will lie in the specified domain. If not specified, the value will default circuit will lie in the specified domain. If not specified, the value will default
to AVAILABILITY_DOMAIN_ANY. to AVAILABILITY_DOMAIN_ANY.
required: false required: false
type: str
type: type:
description: description:
- The type of InterconnectAttachment you wish to create. Defaults to DEDICATED. - The type of InterconnectAttachment you wish to create. Defaults to DEDICATED.
- 'Some valid choices include: "DEDICATED", "PARTNER", "PARTNER_PROVIDER"' - 'Some valid choices include: "DEDICATED", "PARTNER", "PARTNER_PROVIDER"'
required: false required: false
type: str
router: router:
description: description:
- URL of the cloud router to be used for dynamic routing. This router must be - URL of the cloud router to be used for dynamic routing. This router must be
@ -84,6 +88,7 @@ options:
to a gcp_compute_router task and then set this router field to "{{ name-of-resource to a gcp_compute_router task and then set this router field to "{{ name-of-resource
}}"' }}"'
required: true required: true
type: dict
name: name:
description: description:
- Name of the resource. Provided by the client when the resource is created. The - Name of the resource. Provided by the client when the resource is created. The
@ -93,6 +98,7 @@ options:
characters must be a dash, lowercase letter, or digit, except the last character, characters must be a dash, lowercase letter, or digit, except the last character,
which cannot be a dash. which cannot be a dash.
required: true required: true
type: str
candidate_subnets: candidate_subnets:
description: description:
- Up to 16 candidate prefixes that can be used to restrict the allocation of cloudRouterIpAddress - Up to 16 candidate prefixes that can be used to restrict the allocation of cloudRouterIpAddress
@ -103,15 +109,18 @@ options:
/29s are in use on Google's edge. If not supplied, Google will randomly select /29s are in use on Google's edge. If not supplied, Google will randomly select
an unused /29 from all of link-local space. an unused /29 from all of link-local space.
required: false required: false
type: list
vlan_tag8021q: vlan_tag8021q:
description: description:
- The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When using - The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When using
PARTNER type this will be managed upstream. PARTNER type this will be managed upstream.
required: false required: false
type: int
region: region:
description: description:
- Region where the regional interconnect attachment resides. - Region where the regional interconnect attachment resides.
required: true required: true
type: str
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
''' '''

@ -49,6 +49,7 @@ options:
description: description:
- Region where the regional interconnect attachment resides. - Region where the regional interconnect attachment resides.
required: true required: true
type: str
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
''' '''

@ -52,6 +52,7 @@ options:
- An optional description of this resource. The resource must be recreated to - An optional description of this resource. The resource must be recreated to
modify this field. modify this field.
required: false required: false
type: str
ipv4_range: ipv4_range:
description: description:
- If this field is specified, a deprecated legacy network is created. - If this field is specified, a deprecated legacy network is created.
@ -62,6 +63,7 @@ options:
- 'This range is a CIDR specification, for example: `192.168.0.0/16`.' - 'This range is a CIDR specification, for example: `192.168.0.0/16`.'
- The resource must be recreated to modify this field. - The resource must be recreated to modify this field.
required: false required: false
type: str
name: name:
description: description:
- Name of the resource. Provided by the client when the resource is created. The - Name of the resource. Provided by the client when the resource is created. The
@ -71,6 +73,7 @@ options:
characters must be a dash, lowercase letter, or digit, except the last character, characters must be a dash, lowercase letter, or digit, except the last character,
which cannot be a dash. which cannot be a dash.
required: true required: true
type: str
auto_create_subnetworks: auto_create_subnetworks:
description: description:
- When set to `true`, the network is created in "auto subnet mode" and it will - When set to `true`, the network is created in "auto subnet mode" and it will
@ -85,6 +88,7 @@ options:
- The network-level routing configuration for this network. Used by Cloud Router - The network-level routing configuration for this network. Used by Cloud Router
to determine what type of network-wide routing behavior to enforce. to determine what type of network-wide routing behavior to enforce.
required: false required: false
type: dict
version_added: 2.8 version_added: 2.8
suboptions: suboptions:
routing_mode: routing_mode:
@ -96,6 +100,7 @@ options:
regions. regions.
- 'Some valid choices include: "REGIONAL", "GLOBAL"' - 'Some valid choices include: "REGIONAL", "GLOBAL"'
required: true required: true
type: str
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
notes: notes:
- 'API Reference: U(https://cloud.google.com/compute/docs/reference/rest/v1/networks)' - 'API Reference: U(https://cloud.google.com/compute/docs/reference/rest/v1/networks)'

@ -62,14 +62,17 @@ options:
- An optional description of this resource. Provide this property when you create - An optional description of this resource. Provide this property when you create
the resource. the resource.
required: false required: false
type: str
labels: labels:
description: description:
- Labels to apply to this disk. A list of key->value pairs. - Labels to apply to this disk. A list of key->value pairs.
required: false required: false
type: dict
licenses: licenses:
description: description:
- Any applicable publicly visible licenses. - Any applicable publicly visible licenses.
required: false required: false
type: list
name: name:
description: description:
- Name of the resource. Provided by the client when the resource is created. The - Name of the resource. Provided by the client when the resource is created. The
@ -79,6 +82,7 @@ options:
characters must be a dash, lowercase letter, or digit, except the last character, characters must be a dash, lowercase letter, or digit, except the last character,
which cannot be a dash. which cannot be a dash.
required: true required: true
type: str
size_gb: size_gb:
description: description:
- Size of the persistent disk, specified in GB. You can specify this field when - Size of the persistent disk, specified in GB. You can specify this field when
@ -88,6 +92,7 @@ options:
of sizeGb must not be less than the size of the sourceImage or the size of the of sizeGb must not be less than the size of the sourceImage or the size of the
snapshot. snapshot.
required: false required: false
type: int
physical_block_size_bytes: physical_block_size_bytes:
description: description:
- Physical block size of the persistent disk, in bytes. If not present in a request, - Physical block size of the persistent disk, in bytes. If not present in a request,
@ -96,19 +101,23 @@ options:
- If an unsupported value is requested, the error message will list the supported - If an unsupported value is requested, the error message will list the supported
values for the caller's project. values for the caller's project.
required: false required: false
type: int
replica_zones: replica_zones:
description: description:
- URLs of the zones where the disk should be replicated to. - URLs of the zones where the disk should be replicated to.
required: true required: true
type: list
type: type:
description: description:
- URL of the disk type resource describing which disk type to use to create the - URL of the disk type resource describing which disk type to use to create the
disk. Provide this when creating the disk. disk. Provide this when creating the disk.
required: false required: false
type: str
region: region:
description: description:
- A reference to the region where the disk resides. - A reference to the region where the disk resides.
required: true required: true
type: str
disk_encryption_key: disk_encryption_key:
description: description:
- Encrypts the disk using a customer-supplied encryption key. - Encrypts the disk using a customer-supplied encryption key.
@ -120,12 +129,14 @@ options:
will be encrypted using an automatically generated key and you do not need to will be encrypted using an automatically generated key and you do not need to
provide a key to use the disk later. provide a key to use the disk later.
required: false required: false
type: dict
suboptions: suboptions:
raw_key: raw_key:
description: description:
- Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648
base64 to either encrypt or decrypt this resource. base64 to either encrypt or decrypt this resource.
required: false required: false
type: str
source_snapshot: source_snapshot:
description: description:
- The source snapshot used to create this disk. You can provide this as a partial - The source snapshot used to create this disk. You can provide this as a partial
@ -136,17 +147,20 @@ options:
to a gcp_compute_snapshot task and then set this source_snapshot field to "{{ to a gcp_compute_snapshot task and then set this source_snapshot field to "{{
name-of-resource }}"' name-of-resource }}"'
required: false required: false
type: dict
source_snapshot_encryption_key: source_snapshot_encryption_key:
description: description:
- The customer-supplied encryption key of the source snapshot. Required if the - The customer-supplied encryption key of the source snapshot. Required if the
source snapshot is protected by a customer-supplied encryption key. source snapshot is protected by a customer-supplied encryption key.
required: false required: false
type: dict
suboptions: suboptions:
raw_key: raw_key:
description: description:
- Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 - Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648
base64 to either encrypt or decrypt this resource. base64 to either encrypt or decrypt this resource.
required: false required: false
type: str
extends_documentation_fragment: gcp extends_documentation_fragment: gcp
notes: notes:
- 'API Reference: U(https://cloud.google.com/compute/docs/reference/rest/beta/regionDisks)' - 'API Reference: U(https://cloud.google.com/compute/docs/reference/rest/beta/regionDisks)'

Loading…
Cancel
Save