ansible / ansible.builtin / v2.9.27 / module / _gcspanner
Removed in 2.12
Reason:Updated modules released with increased functionality | Alternative:Use M(gcp_spanner_database) and/or M(gcp_spanner_instance) instead.
Create and Delete Instances/Databases on Spanner
| "added in version" 2.3 of ansible.builtin"
Authors: Tom Melendez (@supertom) <tom@supertom.com>
deprecated | supported by community
pip
Install with pip install ansible==2.9.27
Create and Delete Instances/Databases on Spanner. See U(https://cloud.google.com/spanner/docs) for an overview.
- 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
state: choices: - absent - present default: present description: - State of the instance or database. Applies to the most granular resource. - If a C(database_name) is specified we remove it. - If only C(instance_id) is specified, that is what is removed. node_count: default: 1 description: - Number of nodes in the instance. instance_id: description: - GCP spanner instance name. required: true configuration: description: - Configuration the instance should use. - Examples are us-central1, asia-east1 and europe-west1. required: true database_name: description: - Name of database contained on the instance. force_instance_delete: default: 'no' description: - To delete an instance, this argument must exist and be true (along with state being equal to absent). type: bool instance_display_name: description: - Name of Instance to display. - If not specified, instance_id will be used instead.
database_name: description: Name of database. returned: When database name is specified sample: mydatabase type: str instance_id: description: Name of instance. returned: Always sample: myinstance type: str previous_values: description: List of dictionaries containing previous values prior to update. returned: When an instance update has occurred and a field has been modified. sample: '''previous_values'': { ''instance'': { ''instance_display_name'': ''my-instance'', ''node_count'': 1 } }' type: dict state: description: The state of the instance or database. Value will be either 'absent' or 'present'. returned: Always sample: present type: str updated: description: Boolean field to denote an update has occurred. returned: When an update has occurred. sample: true type: bool