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

This commit is contained in:
Alex Stephen 2019-01-16 11:15:03 -08:00 committed by ansibot
commit 5ca5936e05
32 changed files with 282 additions and 188 deletions

View file

@ -95,7 +95,7 @@ items:
- A reference to the UrlMap resource that defines the mapping from URL to the
BackendService.
returned: success
type: dict
type: str
'''
################################################################################

View file

@ -81,15 +81,25 @@ options:
between users and the load balancer. Currently, exactly one SSL certificate
must be specified.
required: true
ssl_policy:
description:
- A reference to the SslPolicy resource that will be associated with the TargetHttpsProxy
resource. If not set, the TargetHttpsProxy resource will not have any SSL policy
configured.
- 'This field represents a link to a SslPolicy 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_ssl_policy
task and then set this ssl_policy field to "{{ name-of-resource }}"'
required: false
version_added: 2.8
url_map:
description:
- 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:
@ -232,11 +242,18 @@ sslCertificates:
users and the load balancer. Currently, exactly one SSL certificate must be specified.
returned: success
type: list
sslPolicy:
description:
- A reference to the SslPolicy resource that will be associated with the TargetHttpsProxy
resource. If not set, the TargetHttpsProxy resource will not have any SSL policy
configured.
returned: success
type: str
urlMap:
description:
- A reference to the UrlMap resource that defines the mapping from URL to the BackendService.
returned: success
type: dict
type: str
'''
################################################################################
@ -261,8 +278,9 @@ def main():
description=dict(type='str'),
name=dict(required=True, type='str'),
quic_override=dict(type='str', choices=['NONE', 'ENABLE', 'DISABLE']),
ssl_certificates=dict(required=True, type='list', elements='dict'),
url_map=dict(required=True, type='dict')
ssl_certificates=dict(required=True, type='list'),
ssl_policy=dict(),
url_map=dict(required=True)
)
)
@ -313,6 +331,8 @@ def update_fields(module, request, response):
quic_override_update(module, request, response)
if response.get('sslCertificates') != request.get('sslCertificates'):
ssl_certificates_update(module, request, response)
if response.get('sslPolicy') != request.get('sslPolicy'):
ssl_policy_update(module, request, response)
if response.get('urlMap') != request.get('urlMap'):
url_map_update(module, request, response)
@ -343,6 +363,19 @@ def ssl_certificates_update(module, request, response):
)
def ssl_policy_update(module, request, response):
auth = GcpSession(module, 'compute')
auth.post(
''.join([
"https://www.googleapis.com/compute/v1/",
"projects/{project}/global/targetHttpsProxies/{name}/setSslPolicy"
]).format(**module.params),
{
u'sslPolicy': replace_resource_dict(module.params.get(u'ssl_policy', {}), 'selfLink')
}
)
def url_map_update(module, request, response):
auth = GcpSession(module, 'compute')
auth.post(
@ -368,6 +401,7 @@ def resource_to_request(module):
u'name': module.params.get('name'),
u'quicOverride': module.params.get('quic_override'),
u'sslCertificates': replace_resource_dict(module.params.get('ssl_certificates', []), 'selfLink'),
u'sslPolicy': replace_resource_dict(module.params.get(u'ssl_policy', {}), 'selfLink'),
u'urlMap': replace_resource_dict(module.params.get(u'url_map', {}), 'selfLink')
}
return_vals = {}
@ -440,6 +474,7 @@ def response_to_hash(module, response):
u'name': module.params.get('name'),
u'quicOverride': response.get(u'quicOverride'),
u'sslCertificates': response.get(u'sslCertificates'),
u'sslPolicy': response.get(u'sslPolicy'),
u'urlMap': response.get(u'urlMap')
}

View file

@ -106,12 +106,19 @@ items:
must be specified.
returned: success
type: list
sslPolicy:
description:
- A reference to the SslPolicy resource that will be associated with the TargetHttpsProxy
resource. If not set, the TargetHttpsProxy resource will not have any SSL
policy configured.
returned: success
type: str
urlMap:
description:
- A reference to the UrlMap resource that defines the mapping from URL to the
BackendService.
returned: success
type: dict
type: str
'''
################################################################################

View file

@ -62,10 +62,9 @@ options:
pool in the "force" mode, where traffic will be spread to the healthy instances
with the best effort, or to all instances when no instance is healthy.
- 'This field represents a link to a TargetPool resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_target_pool
task and then set this backup_pool field to "{{ name-of-resource }}" Alternatively,
you can set this backup_pool to a dictionary with the selfLink key where the
value is the selfLink of your TargetPool'
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_target_pool
task and then set this backup_pool field to "{{ name-of-resource }}"'
required: false
description:
description:
@ -92,10 +91,10 @@ options:
checks pass. If not specified it means all member instances will be considered
healthy at all times.
- 'This field represents a link to a HttpHealthCheck resource in GCP. It can be
specified in two ways. You can add `register: name-of-resource` to a gcp_compute_http_health_check
task and then set this health_check field to "{{ name-of-resource }}" Alternatively,
you can set this health_check to a dictionary with the selfLink key where the
value is the selfLink of your HttpHealthCheck'
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_http_health_check task and then set this health_check field to
"{{ name-of-resource }}"'
required: false
instances:
description:
@ -160,7 +159,7 @@ backupPool:
pool in the "force" mode, where traffic will be spread to the healthy instances
with the best effort, or to all instances when no instance is healthy.
returned: success
type: dict
type: str
creationTimestamp:
description:
- Creation timestamp in RFC3339 text format.
@ -193,7 +192,7 @@ healthCheck:
checks pass. If not specified it means all member instances will be considered
healthy at all times.
returned: success
type: dict
type: str
id:
description:
- The unique identifier for the resource.
@ -251,11 +250,11 @@ def main():
module = GcpModule(
argument_spec=dict(
state=dict(default='present', choices=['present', 'absent'], type='str'),
backup_pool=dict(type='dict'),
backup_pool=dict(),
description=dict(type='str'),
failover_ratio=dict(type='str'),
health_check=dict(type='dict'),
instances=dict(type='list', elements='dict'),
health_check=dict(),
instances=dict(type='list'),
name=dict(required=True, type='str'),
session_affinity=dict(type='str', choices=['NONE', 'CLIENT_IP', 'CLIENT_IP_PROTO']),
region=dict(required=True, type='str')

View file

@ -84,7 +84,7 @@ items:
primary pool in the "force" mode, where traffic will be spread to the healthy
instances with the best effort, or to all instances when no instance is healthy.
returned: success
type: dict
type: str
creationTimestamp:
description:
- Creation timestamp in RFC3339 text format.
@ -117,7 +117,7 @@ items:
checks pass. If not specified it means all member instances will be considered
healthy at all times.
returned: success
type: dict
type: str
id:
description:
- The unique identifier for the resource.

View file

@ -74,10 +74,10 @@ options:
description:
- A reference to the BackendService resource.
- 'This field represents a link to a BackendService resource in GCP. It can be
specified in two ways. You can add `register: name-of-resource` to a gcp_compute_backend_service
task and then set this service field to "{{ name-of-resource }}" Alternatively,
you can set this service to a dictionary with the selfLink key where the value
is the selfLink of your BackendService'
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_backend_service task and then set this service field to "{{ name-of-resource
}}"'
required: true
ssl_certificates:
description:
@ -85,6 +85,17 @@ options:
between users and the load balancer. Currently, exactly one SSL certificate
must be specified.
required: true
ssl_policy:
description:
- A reference to the SslPolicy resource that will be associated with the TargetSslProxy
resource. If not set, the TargetSslProxy resource will not have any SSL policy
configured.
- 'This field represents a link to a SslPolicy 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_ssl_policy
task and then set this ssl_policy field to "{{ name-of-resource }}"'
required: false
version_added: 2.8
extends_documentation_fragment: gcp
notes:
- 'API Reference: U(https://cloud.google.com/compute/docs/reference/latest/targetSslProxies)'
@ -215,13 +226,20 @@ service:
description:
- A reference to the BackendService resource.
returned: success
type: dict
type: str
sslCertificates:
description:
- A list of SslCertificate resources that are used to authenticate connections between
users and the load balancer. Currently, exactly one SSL certificate must be specified.
returned: success
type: list
sslPolicy:
description:
- A reference to the SslPolicy resource that will be associated with the TargetSslProxy
resource. If not set, the TargetSslProxy resource will not have any SSL policy
configured.
returned: success
type: str
'''
################################################################################
@ -246,8 +264,9 @@ def main():
description=dict(type='str'),
name=dict(required=True, type='str'),
proxy_header=dict(type='str', choices=['NONE', 'PROXY_V1']),
service=dict(required=True, type='dict'),
ssl_certificates=dict(required=True, type='list', elements='dict')
service=dict(required=True),
ssl_certificates=dict(required=True, type='list'),
ssl_policy=dict()
)
)
@ -300,6 +319,8 @@ def update_fields(module, request, response):
service_update(module, request, response)
if response.get('sslCertificates') != request.get('sslCertificates'):
ssl_certificates_update(module, request, response)
if response.get('sslPolicy') != request.get('sslPolicy'):
ssl_policy_update(module, request, response)
def proxy_header_update(module, request, response):
@ -341,6 +362,19 @@ def ssl_certificates_update(module, request, response):
)
def ssl_policy_update(module, request, response):
auth = GcpSession(module, 'compute')
auth.post(
''.join([
"https://www.googleapis.com/compute/v1/",
"projects/{project}/global/targetSslProxies/{name}/setSslPolicy"
]).format(**module.params),
{
u'sslPolicy': replace_resource_dict(module.params.get(u'ssl_policy', {}), 'selfLink')
}
)
def delete(module, link, kind):
auth = GcpSession(module, 'compute')
return wait_for_operation(module, auth.delete(link))
@ -353,7 +387,8 @@ def resource_to_request(module):
u'name': module.params.get('name'),
u'proxyHeader': module.params.get('proxy_header'),
u'service': replace_resource_dict(module.params.get(u'service', {}), 'selfLink'),
u'sslCertificates': replace_resource_dict(module.params.get('ssl_certificates', []), 'selfLink')
u'sslCertificates': replace_resource_dict(module.params.get('ssl_certificates', []), 'selfLink'),
u'sslPolicy': replace_resource_dict(module.params.get(u'ssl_policy', {}), 'selfLink')
}
return_vals = {}
for k, v in request.items():
@ -425,7 +460,8 @@ def response_to_hash(module, response):
u'name': module.params.get('name'),
u'proxyHeader': response.get(u'proxyHeader'),
u'service': response.get(u'service'),
u'sslCertificates': response.get(u'sslCertificates')
u'sslCertificates': response.get(u'sslCertificates'),
u'sslPolicy': response.get(u'sslPolicy')
}

View file

@ -100,7 +100,7 @@ items:
description:
- A reference to the BackendService resource.
returned: success
type: dict
type: str
sslCertificates:
description:
- A list of SslCertificate resources that are used to authenticate connections
@ -108,6 +108,13 @@ items:
must be specified.
returned: success
type: list
sslPolicy:
description:
- A reference to the SslPolicy resource that will be associated with the TargetSslProxy
resource. If not set, the TargetSslProxy resource will not have any SSL policy
configured.
returned: success
type: str
'''
################################################################################

View file

@ -74,10 +74,10 @@ options:
description:
- A reference to the BackendService resource.
- 'This field represents a link to a BackendService resource in GCP. It can be
specified in two ways. You can add `register: name-of-resource` to a gcp_compute_backend_service
task and then set this service field to "{{ name-of-resource }}" Alternatively,
you can set this service to a dictionary with the selfLink key where the value
is the selfLink of your BackendService'
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_backend_service task and then set this service field to "{{ name-of-resource
}}"'
required: true
extends_documentation_fragment: gcp
notes:
@ -174,7 +174,7 @@ service:
description:
- A reference to the BackendService resource.
returned: success
type: dict
type: str
'''
################################################################################
@ -199,7 +199,7 @@ def main():
description=dict(type='str'),
name=dict(required=True, type='str'),
proxy_header=dict(type='str', choices=['NONE', 'PROXY_V1']),
service=dict(required=True, type='dict')
service=dict(required=True)
)
)

View file

@ -100,7 +100,7 @@ items:
description:
- A reference to the BackendService resource.
returned: success
type: dict
type: str
'''
################################################################################

View file

@ -66,10 +66,9 @@ options:
description:
- The network this VPN gateway is accepting traffic for.
- '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
region:
description:
@ -141,15 +140,16 @@ network:
description:
- The network this VPN gateway is accepting traffic for.
returned: success
type: dict
type: str
tunnels:
description:
- A list of references to VpnTunnel resources associated to this VPN gateway.
- A list of references to VpnTunnel resources associated with this VPN gateway.
returned: success
type: list
forwardingRules:
description:
- A list of references to the ForwardingRule resources associated to this VPN gateway.
- A list of references to the ForwardingRule resources associated with this VPN
gateway.
returned: success
type: list
region:
@ -180,7 +180,7 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'),
description=dict(type='str'),
name=dict(required=True, type='str'),
network=dict(required=True, type='dict'),
network=dict(required=True),
region=dict(required=True, type='str')
)
)

View file

@ -99,16 +99,16 @@ items:
description:
- The network this VPN gateway is accepting traffic for.
returned: success
type: dict
type: str
tunnels:
description:
- A list of references to VpnTunnel resources associated to this VPN gateway.
- A list of references to VpnTunnel resources associated with this VPN gateway.
returned: success
type: list
forwardingRules:
description:
- A list of references to the ForwardingRule resources associated to this VPN
gateway.
- A list of references to the ForwardingRule resources associated with this
VPN gateway.
returned: success
type: list
region:

View file

@ -53,10 +53,10 @@ options:
description:
- A reference to BackendService resource if none of the hostRules match.
- 'This field represents a link to a BackendService resource in GCP. It can be
specified in two ways. You can add `register: name-of-resource` to a gcp_compute_backend_service
task and then set this default_service field to "{{ name-of-resource }}" Alternatively,
you can set this default_service to a dictionary with the selfLink key where
the value is the selfLink of your BackendService'
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_backend_service task and then set this default_service field to
"{{ name-of-resource }}"'
required: true
description:
description:
@ -103,11 +103,10 @@ options:
- A reference to a BackendService resource. This will be used if none of the
pathRules defined by this PathMatcher is matched by the URL's path portion.
- 'This field represents a link to a BackendService resource in GCP. It can
be specified in two ways. You can add `register: name-of-resource` to a
gcp_compute_backend_service task and then set this default_service field
to "{{ name-of-resource }}" Alternatively, you can set this default_service
to a dictionary with the selfLink key where the value is the selfLink of
your BackendService'
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_backend_service task and then set this default_service
field to "{{ name-of-resource }}"'
required: true
description:
description:
@ -133,11 +132,10 @@ options:
description:
- A reference to the BackendService resource if this rule is matched.
- 'This field represents a link to a BackendService resource in GCP. It
can be specified in two ways. You can add `register: name-of-resource`
to a gcp_compute_backend_service task and then set this service field
to "{{ name-of-resource }}" Alternatively, you can set this service
to a dictionary with the selfLink key where the value is the selfLink
of your BackendService'
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_backend_service task and then set
this service field to "{{ name-of-resource }}"'
required: true
tests:
description:
@ -162,10 +160,10 @@ options:
- A reference to expected BackendService resource the given URL should be
mapped to.
- 'This field represents a link to a BackendService resource in GCP. It can
be specified in two ways. You can add `register: name-of-resource` to a
gcp_compute_backend_service task and then set this service field to "{{
name-of-resource }}" Alternatively, you can set this service to a dictionary
with the selfLink key where the value is the selfLink of your BackendService'
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_backend_service task and then set this service field to
"{{ name-of-resource }}"'
required: true
extends_documentation_fragment: gcp
'''
@ -228,7 +226,7 @@ defaultService:
description:
- A reference to BackendService resource if none of the hostRules match.
returned: success
type: dict
type: str
description:
description:
- An optional description of this resource. Provide this property when you create
@ -292,7 +290,7 @@ pathMatchers:
- A reference to a BackendService resource. This will be used if none of the
pathRules defined by this PathMatcher is matched by the URL's path portion.
returned: success
type: dict
type: str
description:
description:
- An optional description of this resource.
@ -321,7 +319,7 @@ pathMatchers:
description:
- A reference to the BackendService resource if this rule is matched.
returned: success
type: dict
type: str
tests:
description:
- The list of expected URL mappings. Requests to update this UrlMap will succeed
@ -349,7 +347,7 @@ tests:
- A reference to expected BackendService resource the given URL should be mapped
to.
returned: success
type: dict
type: str
'''
################################################################################
@ -371,7 +369,7 @@ def main():
module = GcpModule(
argument_spec=dict(
state=dict(default='present', choices=['present', 'absent'], type='str'),
default_service=dict(required=True, type='dict'),
default_service=dict(required=True),
description=dict(type='str'),
host_rules=dict(type='list', elements='dict', options=dict(
description=dict(type='str'),
@ -380,19 +378,19 @@ def main():
)),
name=dict(required=True, type='str'),
path_matchers=dict(type='list', elements='dict', options=dict(
default_service=dict(required=True, type='dict'),
default_service=dict(required=True),
description=dict(type='str'),
name=dict(required=True, type='str'),
path_rules=dict(type='list', elements='dict', options=dict(
paths=dict(required=True, type='list', elements='str'),
service=dict(required=True, type='dict')
service=dict(required=True)
))
)),
tests=dict(type='list', elements='dict', options=dict(
description=dict(type='str'),
host=dict(required=True, type='str'),
path=dict(required=True, type='str'),
service=dict(required=True, type='dict')
service=dict(required=True)
))
)
)

View file

@ -74,7 +74,7 @@ items:
description:
- A reference to BackendService resource if none of the hostRules match.
returned: success
type: dict
type: str
description:
description:
- An optional description of this resource. Provide this property when you create
@ -139,7 +139,7 @@ items:
the pathRules defined by this PathMatcher is matched by the URL's path
portion.
returned: success
type: dict
type: str
description:
description:
- An optional description of this resource.
@ -168,7 +168,7 @@ items:
description:
- A reference to the BackendService resource if this rule is matched.
returned: success
type: dict
type: str
tests:
description:
- The list of expected URL mappings. Requests to update this UrlMap will succeed
@ -196,7 +196,7 @@ items:
- A reference to expected BackendService resource the given URL should be
mapped to.
returned: success
type: dict
type: str
'''
################################################################################

View file

@ -64,19 +64,18 @@ options:
description:
- URL of the Target VPN gateway with which this VPN tunnel is associated.
- 'This field represents a link to a TargetVpnGateway resource in GCP. It can
be specified in two ways. You can add `register: name-of-resource` to a gcp_compute_target_vpn_gateway
task and then set this target_vpn_gateway field to "{{ name-of-resource }}"
Alternatively, you can set this target_vpn_gateway to a dictionary with the
selfLink key where the value is the selfLink of your TargetVpnGateway'
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_target_vpn_gateway task and then set this target_vpn_gateway field
to "{{ name-of-resource }}"'
required: true
router:
description:
- URL of router resource to be used for dynamic routing.
- 'This field represents a link to a Router resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_compute_router
task and then set this router field to "{{ name-of-resource }}" Alternatively,
you can set this router to a dictionary with the selfLink key where the value
is the selfLink of your Router'
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_router
task and then set this router field to "{{ name-of-resource }}"'
required: false
peer_ip:
description:
@ -125,7 +124,7 @@ notes:
EXAMPLES = '''
- name: create a network
gcp_compute_network:
name: "network-vpn_tunnel"
name: "network-vpn-tunnel"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
@ -134,7 +133,7 @@ EXAMPLES = '''
- name: create a router
gcp_compute_router:
name: "router-vpn_tunnel"
name: "router-vpn-tunnel"
network: "{{ network }}"
bgp:
asn: 64514
@ -153,7 +152,7 @@ EXAMPLES = '''
- name: create a target vpn gateway
gcp_compute_target_vpn_gateway:
name: "gateway-vpn_tunnel"
name: "gateway-vpn-tunnel"
region: us-west1
network: "{{ network }}"
project: "{{ gcp_project }}"
@ -199,12 +198,12 @@ targetVpnGateway:
description:
- URL of the Target VPN gateway with which this VPN tunnel is associated.
returned: success
type: dict
type: str
router:
description:
- URL of router resource to be used for dynamic routing.
returned: success
type: dict
type: str
peerIp:
description:
- IP address of the peer VPN gateway. Only IPv4 is supported.
@ -282,8 +281,8 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'),
name=dict(required=True, type='str'),
description=dict(type='str'),
target_vpn_gateway=dict(required=True, type='dict'),
router=dict(type='dict'),
target_vpn_gateway=dict(required=True),
router=dict(),
peer_ip=dict(required=True, type='str'),
shared_secret=dict(required=True, type='str'),
ike_version=dict(default=2, type='int'),

View file

@ -93,12 +93,12 @@ items:
description:
- URL of the Target VPN gateway with which this VPN tunnel is associated.
returned: success
type: dict
type: str
router:
description:
- URL of router resource to be used for dynamic routing.
returned: success
type: dict
type: str
peerIp:
description:
- IP address of the peer VPN gateway. Only IPv4 is supported.

View file

@ -153,7 +153,7 @@ options:
preemptible:
description:
- 'Whether the nodes are created as preemptible VM instances. See: U(https://cloud.google.com/compute/docs/instances/preemptible)
for more inforamtion about preemptible VM instances.'
for more information about preemptible VM instances.'
required: false
type: bool
master_auth:
@ -210,8 +210,6 @@ options:
description:
- The name of the Google Compute Engine network to which the cluster is connected.
If left unspecified, the default network will be used.
- To ensure it exists and it is operations, configure the network using 'gcompute_network'
resource.
required: false
cluster_ipv4_cidr:
description:
@ -403,7 +401,7 @@ nodeConfig:
preemptible:
description:
- 'Whether the nodes are created as preemptible VM instances. See: U(https://cloud.google.com/compute/docs/instances/preemptible)
for more inforamtion about preemptible VM instances.'
for more information about preemptible VM instances.'
returned: success
type: bool
masterAuth:
@ -462,8 +460,6 @@ network:
description:
- The name of the Google Compute Engine network to which the cluster is connected.
If left unspecified, the default network will be used.
- To ensure it exists and it is operations, configure the network using 'gcompute_network'
resource.
returned: success
type: str
clusterIpv4Cidr:

View file

@ -181,7 +181,7 @@ items:
preemptible:
description:
- 'Whether the nodes are created as preemptible VM instances. See: U(https://cloud.google.com/compute/docs/instances/preemptible)
for more inforamtion about preemptible VM instances.'
for more information about preemptible VM instances.'
returned: success
type: bool
masterAuth:
@ -240,8 +240,6 @@ items:
description:
- The name of the Google Compute Engine network to which the cluster is connected.
If left unspecified, the default network will be used.
- To ensure it exists and it is operations, configure the network using 'gcompute_network'
resource.
returned: success
type: str
clusterIpv4Cidr:

View file

@ -136,7 +136,7 @@ options:
preemptible:
description:
- 'Whether the nodes are created as preemptible VM instances. See: U(https://cloud.google.com/compute/docs/instances/preemptible)
for more inforamtion about preemptible VM instances.'
for more information about preemptible VM instances.'
required: false
type: bool
initial_node_count:
@ -204,10 +204,9 @@ options:
description:
- The cluster this node pool belongs to.
- 'This field represents a link to a Cluster resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_container_cluster
task and then set this cluster field to "{{ name-of-resource }}" Alternatively,
you can set this cluster to a dictionary with the name key where the value is
the name of your Cluster'
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_container_cluster
task and then set this cluster field to "{{ name-of-resource }}"'
required: true
zone:
description:
@ -336,7 +335,7 @@ config:
preemptible:
description:
- 'Whether the nodes are created as preemptible VM instances. See: U(https://cloud.google.com/compute/docs/instances/preemptible)
for more inforamtion about preemptible VM instances.'
for more information about preemptible VM instances.'
returned: success
type: bool
initialNodeCount:
@ -416,7 +415,7 @@ cluster:
description:
- The cluster this node pool belongs to.
returned: success
type: dict
type: str
zone:
description:
- The zone where the node pool is deployed.
@ -470,7 +469,7 @@ def main():
description=dict(type='str')
))
)),
cluster=dict(required=True, type='dict'),
cluster=dict(required=True),
zone=dict(required=True, type='str')
)
)

View file

@ -49,10 +49,9 @@ options:
description:
- The cluster this node pool belongs to.
- 'This field represents a link to a Cluster resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_container_cluster
task and then set this cluster field to "{{ name-of-resource }}" Alternatively,
you can set this cluster to a dictionary with the name key where the value is
the name of your Cluster'
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_container_cluster
task and then set this cluster field to "{{ name-of-resource }}"'
required: true
extends_documentation_fragment: gcp
'''
@ -168,7 +167,7 @@ items:
preemptible:
description:
- 'Whether the nodes are created as preemptible VM instances. See: U(https://cloud.google.com/compute/docs/instances/preemptible)
for more inforamtion about preemptible VM instances.'
for more information about preemptible VM instances.'
returned: success
type: bool
initialNodeCount:
@ -249,7 +248,7 @@ items:
description:
- The cluster this node pool belongs to.
returned: success
type: dict
type: str
zone:
description:
- The zone where the node pool is deployed.
@ -272,7 +271,7 @@ def main():
module = GcpModule(
argument_spec=dict(
zone=dict(required=True, type='str'),
cluster=dict(required=True, type='dict')
cluster=dict(required=True)
)
)

View file

@ -86,10 +86,9 @@ options:
- Identifies the managed zone addressed by this request.
- Can be the managed zone name or id.
- 'This field represents a link to a ManagedZone resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_dns_managed_zone
task and then set this managed_zone field to "{{ name-of-resource }}" Alternatively,
you can set this managed_zone to a dictionary with the name key where the value
is the name of your ManagedZone'
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_dns_managed_zone
task and then set this managed_zone field to "{{ name-of-resource }}"'
required: true
extends_documentation_fragment: gcp
'''
@ -147,7 +146,7 @@ managed_zone:
- Identifies the managed zone addressed by this request.
- Can be the managed zone name or id.
returned: success
type: dict
type: str
'''
################################################################################
@ -175,7 +174,7 @@ def main():
type=dict(required=True, type='str', choices=['A', 'AAAA', 'CAA', 'CNAME', 'MX', 'NAPTR', 'NS', 'PTR', 'SOA', 'SPF', 'SRV', 'TXT']),
ttl=dict(type='int'),
target=dict(type='list', elements='str'),
managed_zone=dict(required=True, type='dict')
managed_zone=dict(required=True)
)
)

View file

@ -46,10 +46,9 @@ options:
- Identifies the managed zone addressed by this request.
- Can be the managed zone name or id.
- 'This field represents a link to a ManagedZone resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_dns_managed_zone
task and then set this managed_zone field to "{{ name-of-resource }}" Alternatively,
you can set this managed_zone to a dictionary with the name key where the value
is the name of your ManagedZone'
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_dns_managed_zone
task and then set this managed_zone field to "{{ name-of-resource }}"'
required: true
extends_documentation_fragment: gcp
'''
@ -94,7 +93,7 @@ items:
- Identifies the managed zone addressed by this request.
- Can be the managed zone name or id.
returned: success
type: dict
type: str
'''
################################################################################
@ -111,7 +110,7 @@ import json
def main():
module = GcpModule(
argument_spec=dict(
managed_zone=dict(required=True, type='dict')
managed_zone=dict(required=True)
)
)

View file

@ -57,10 +57,9 @@ options:
description:
- A reference to a Topic resource.
- 'This field represents a link to a Topic resource in GCP. It can be specified
in two ways. You can add `register: name-of-resource` to a gcp_pubsub_topic
task and then set this topic field to "{{ name-of-resource }}" Alternatively,
you can set this topic to a dictionary with the name key where the value is
the name of your Topic'
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_pubsub_topic
task and then set this topic field to "{{ name-of-resource }}"'
required: false
push_config:
description:
@ -108,8 +107,6 @@ EXAMPLES = '''
gcp_pubsub_subscription:
name: "test_object"
topic: "{{ topic }}"
push_config:
push_endpoint: https://myapp.graphite.cloudnativeapp.com/webhook/sub1
ack_deadline_seconds: 300
project: "test_project"
auth_kind: "serviceaccount"
@ -127,7 +124,7 @@ topic:
description:
- A reference to a Topic resource.
returned: success
type: dict
type: str
pushConfig:
description:
- If push delivery is used with this subscription, this field is used to configure
@ -181,7 +178,7 @@ def main():
argument_spec=dict(
state=dict(default='present', choices=['present', 'absent'], type='str'),
name=dict(type='str'),
topic=dict(type='dict'),
topic=dict(),
push_config=dict(type='dict', options=dict(
push_endpoint=dict(type='str')
)),