community / community.general / 1.3.14 / module / gcspanner
Removed in 2.0.0
Reason:Updated modules released with increased functionality | Alternative:Use M(google.cloud.gcp_spanner_database) and/or M(google.cloud.gcp_spanner_instance) instead.
Create and Delete Instances/Databases on Spanner
Authors: Tom Melendez (@supertom) <tom@supertom.com>
Install with ansible-galaxy collection install community.general:==1.3.14
collections: - name: community.general version: 1.3.14
Create and Delete Instances/Databases on Spanner. See U(https://cloud.google.com/spanner/docs) for an overview.
- name: Create instance community.general.gcspanner: instance_id: '{{ instance_id }}' configuration: '{{ configuration }}' state: present node_count: 1
- name: Create database community.general.gcspanner: instance_id: '{{ instance_id }}' configuration: '{{ configuration }}' database_name: '{{ database_name }}' state: present
- name: Delete instance (and all databases)
- community.general.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. type: str node_count: default: 1 description: - Number of nodes in the instance. type: int project_id: description: - your GCE project ID type: str instance_id: description: - GCP spanner instance name. required: true type: str configuration: description: - Configuration the instance should use. - Examples are us-central1, asia-east1 and europe-west1. required: true type: str database_name: description: - Name of database contained on the instance. type: str credentials_file: description: - path to the JSON file associated with the service account email type: str 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. type: str service_account_email: description: - service account email type: str
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