Removed in Ansible: | |
---|---|
version: 2.12 | |
Why: | Updated modules released with increased functionality |
Alternative: | Use gcp_spanner_database and/or gcp_spanner_instance instead. |
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
configuration - / required | Configuration the instance should use. Examples are us-central1, asia-east1 and europe-west1. | |
database_name - | Name of database contained on the instance. | |
force_instance_delete boolean |
| To delete an instance, this argument must exist and be true (along with state being equal to absent). |
instance_display_name - | Name of Instance to display. If not specified, instance_id will be used instead. | |
instance_id - / required | GCP spanner instance name. | |
node_count - | Default: 1 | Number of nodes in the instance. |
state - |
| State of the instance or database. Applies to the most granular resource. If a database_name is specified we remove it.If only instance_id is specified, that is what is removed. |
Note
- name: Create instance gcspanner: instance_id: '{{ instance_id }}' configuration: '{{ configuration }}' state: present node_count: 1 - name: Create database gcspanner: instance_id: '{{ instance_id }}' configuration: '{{ configuration }}' database_name: '{{ database_name }}' state: present - name: Delete instance (and all databases) - gcspanner: instance_id: '{{ instance_id }}' configuration: '{{ configuration }}' state: absent force_instance_delete: yes
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
database_name string | When database name is specified | Name of database. Sample: mydatabase |
instance_id string | Always | Name of instance. Sample: myinstance |
previous_values dictionary | When an instance update has occurred and a field has been modified. | List of dictionaries containing previous values prior to update. Sample: 'previous_values': { 'instance': { 'instance_display_name': 'my-instance', 'node_count': 1 } } |
state string | Always | The state of the instance or database. Value will be either 'absent' or 'present'. Sample: present |
updated boolean | When an update has occurred. | Boolean field to denote an update has occurred. Sample: True |
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.9/modules/gcspanner_module.html