mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-07-27 07:01:32 -07:00
examples showing an improper auth value (#87)
<!-- This change is generated by MagicModules. --> /cc @rambleraptor
This commit is contained in:
parent
9782d6906b
commit
0a18332815
98 changed files with 2171 additions and 1727 deletions
|
@ -44,25 +44,27 @@ options:
|
|||
description:
|
||||
- The instance to create the database on.
|
||||
- 'This field represents a link to a Instance resource in GCP. It can be specified
|
||||
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_spanner_instance
|
||||
task and then set this instance field to "{{ name-of-resource }}"'
|
||||
in two ways. First, you can place a dictionary with key ''name'' and value of
|
||||
your resource''s name Alternatively, you can add `register: name-of-resource`
|
||||
to a gcp_spanner_instance task and then set this instance field to "{{ name-of-resource
|
||||
}}"'
|
||||
required: true
|
||||
extends_documentation_fragment: gcp
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: a database facts
|
||||
- name: " a database facts"
|
||||
gcp_spanner_database_facts:
|
||||
instance: "{{ instance }}"
|
||||
project: test_project
|
||||
auth_kind: serviceaccount
|
||||
service_account_file: "/tmp/auth.pem"
|
||||
instance: "{{ instance }}"
|
||||
project: test_project
|
||||
auth_kind: serviceaccount
|
||||
service_account_file: "/tmp/auth.pem"
|
||||
state: facts
|
||||
'''
|
||||
|
||||
RETURN = '''
|
||||
items:
|
||||
description: List of items
|
||||
resources:
|
||||
description: List of resources
|
||||
returned: always
|
||||
type: complex
|
||||
contains:
|
||||
|
@ -84,7 +86,7 @@ items:
|
|||
description:
|
||||
- The instance to create the database on.
|
||||
returned: success
|
||||
type: str
|
||||
type: dict
|
||||
'''
|
||||
|
||||
################################################################################
|
||||
|
@ -99,7 +101,7 @@ import json
|
|||
|
||||
|
||||
def main():
|
||||
module = GcpModule(argument_spec=dict(instance=dict(required=True)))
|
||||
module = GcpModule(argument_spec=dict(instance=dict(required=True, type='dict')))
|
||||
|
||||
if not module.params['scopes']:
|
||||
module.params['scopes'] = ['https://www.googleapis.com/auth/spanner.admin']
|
||||
|
@ -109,7 +111,7 @@ def main():
|
|||
items = items.get('databases')
|
||||
else:
|
||||
items = []
|
||||
return_value = {'items': items}
|
||||
return_value = {'resources': items}
|
||||
module.exit_json(**return_value)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue