examples showing an improper auth value (#87)

<!-- This change is generated by MagicModules. -->
/cc @rambleraptor
This commit is contained in:
The Magician 2018-09-07 14:15:36 -07:00 committed by Alex Stephen
commit 0a18332815
98 changed files with 2171 additions and 1727 deletions

View file

@ -52,10 +52,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. 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 }}"'
specified in two ways. First, you can place a dictionary with key ''selfLink''
and value of your resource''s selfLink 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:
@ -102,10 +102,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. 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 }}"'
be specified in two ways. First, you can place a dictionary with key ''selfLink''
and value of your resource''s selfLink 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:
@ -131,10 +131,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. 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 }}"'
can be specified in two ways. First, you can place a dictionary with
key ''selfLink'' and value of your resource''s selfLink 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:
@ -159,10 +159,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. 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 }}"'
be specified in two ways. First, you can place a dictionary with key ''selfLink''
and value of your resource''s selfLink 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
'''
@ -170,39 +170,39 @@ extends_documentation_fragment: gcp
EXAMPLES = '''
- name: create a instance group
gcp_compute_instance_group:
name: "instancegroup-urlmap"
zone: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
name: instancegroup-urlmap
zone: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: instancegroup
- name: create a http health check
gcp_compute_http_health_check:
name: "httphealthcheck-urlmap"
healthy_threshold: 10
port: 8080
timeout_sec: 2
unhealthy_threshold: 5
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
name: httphealthcheck-urlmap
healthy_threshold: 10
port: 8080
timeout_sec: 2
unhealthy_threshold: 5
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: healthcheck
- name: create a backend service
gcp_compute_backend_service:
name: "backendservice-urlmap"
backends:
- group: "{{ instancegroup }}"
health_checks:
- "{{ healthcheck.selfLink }}"
enable_cdn: true
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
name: backendservice-urlmap
backends:
- group: "{{ instancegroup }}"
health_checks:
- "{{ healthcheck.selfLink }}"
enable_cdn: 'true'
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: backendservice
- name: create a url map
@ -225,7 +225,7 @@ defaultService:
description:
- A reference to BackendService resource if none of the hostRules match.
returned: success
type: str
type: dict
description:
description:
- An optional description of this resource. Provide this property when you create
@ -289,7 +289,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: str
type: dict
description:
description:
- An optional description of this resource.
@ -318,7 +318,7 @@ pathMatchers:
description:
- A reference to the BackendService resource if this rule is matched.
returned: success
type: str
type: dict
tests:
description:
- The list of expected URL mappings. Requests to update this UrlMap will succeed
@ -346,7 +346,7 @@ tests:
- A reference to expected BackendService resource the given URL should be mapped
to.
returned: success
type: str
type: dict
'''
################################################################################
@ -368,7 +368,7 @@ def main():
module = GcpModule(
argument_spec=dict(
state=dict(default='present', choices=['present', 'absent'], type='str'),
default_service=dict(required=True),
default_service=dict(required=True, type='dict'),
description=dict(type='str'),
host_rules=dict(
type='list',
@ -382,11 +382,13 @@ def main():
type='list',
elements='dict',
options=dict(
default_service=dict(required=True),
default_service=dict(required=True, type='dict'),
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='list',
elements='dict',
options=dict(paths=dict(required=True, type='list', elements='str'), service=dict(required=True, type='dict')),
),
),
),
@ -394,7 +396,10 @@ def main():
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)
description=dict(type='str'),
host=dict(required=True, type='str'),
path=dict(required=True, type='str'),
service=dict(required=True, type='dict'),
),
),
)