fabiog1901.cockroachdb.cc_clusters_info module – List clusters owned by an organization.
Note
This module is part of the fabiog1901.cockroachdb collection (version 1.0.0).
To install it, use: ansible-galaxy collection install fabiog1901.cockroachdb
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: fabiog1901.cockroachdb.cc_clusters_info
.
New in fabiog1901.cockroachdb 1.0.0
Synopsis
List clusters owned by an organization.
A Cockroach Cloud Service Account API Key is required.
Export the key as environment variable ‘CC_KEY’ or pass it on module invokation
Requirements
The below requirements are needed on the host that executes this module.
cockroachdb-cloud-client
Parameters
Parameter |
Comments |
---|---|
Define details for the API client |
|
The API version to use Default: |
|
The Service Account API key This value is log redacted By default it reads the env variable ‘CC_KEY’ |
|
the hostname of the API server Default: |
|
the path to the API endpoint Default: |
|
the port number, as a string, for the API server Default: |
|
http or https Choices:
|
|
whether the client should verify the server cert Choices:
|
|
The UUID or name of the cluster you want to get information for. Omit for a full list of clusters under the organization. |
|
If true, show clusters that have been deleted or failed to initialize. Choices:
|
|
If true, show nodes that compose this cluster. Only available for CUSTOM or DEDICATED clusters. Choices:
|
Examples
- name: list CC clusters in my org
fabiog1901.cockroachdb.cc_clusters_info:
show_inactive: no
show_nodes: no
api_client:
api_version: '2022-09-20'
register: out
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
A list of regions Returned: always Sample: |
|
Returned: always |
|
GCP: The Google Cloud Platform cloud provider. AWS: The Amazon Web Services cloud provider. Allowed: GCP┃AWS Returned: always |
|
Returned: always |
|
config details for either dedicated or serverless. Returned: always |
|
present only if dedicated cluster Returned: success |
|
DiskIOPs is the number of disk I/O operations per second that are permitted on each node in the cluster. Zero indicates the cloud provider-specific default. Returned: always |
|
MachineType is the machine type identifier within the given cloud provider, ex. m5.xlarge, n2-standard-4. Returned: always |
|
NumVirtualCPUs is the number of virtual CPUs per node in the cluster. Returned: always |
|
StorageGiB is the number of storage GiB per node in the cluster. Returned: always |
|
present only if serverless cluster Returned: success |
|
Used to build a connection string. Returned: always |
|
Spend limit in US cents. Returned: always |
|
date-time Returned: always |
|
Returned: always |
|
date-time Returned: success |
|
Returned: always |
|
Returned: always |
|
list of nodes that make up the cluster. Only returned if show_nodes is True. Only returned for Dedicated or Custom cluster. Not for Serverless clusters. Returned: success |
|
Returned: success |
|
Returned: success |
|
Allowed: LIVE┃NOT_READY Returned: success |
|
Allowed: CLUSTER_STATUS_UNSPECIFIED┃CRDB_MAJOR_UPGRADE_RUNNING┃CRDB_MAJOR_UPGRADE_FAILED┃CRDB_MAJOR_ROLLBACK_RUNNING┃CRDB_MAJOR_ROLLBACK_FAILED┃CRDB_PATCH_RUNNING┃CRDB_PATCH_FAILED┃CRDB_SCALE_RUNNING┃CRDB_SCALE_FAILED┃MAINTENANCE_RUNNING┃CRDB_INSTANCE_UPDATE_RUNNING┃CRDB_INSTANCE_UPDATE_FAILED┃CRDB_EDIT_CLUSTER_RUNNING┃CRDB_EDIT_CLUSTER_FAILED┃CRDB_CMEK_OPERATION_RUNNING┃CRDB_CMEK_OPERATION_FAILED┃TENANT_RESTORE_RUNNING┃TENANT_RESTORE_FAILED┃CRDB_LOG_EXPORT_OPERATION_RUNNING┃CRDB_LOG_EXPORT_OPERATION_FAILED Returned: always |
|
DEDICATED: A paid plan that offers dedicated hardware in any location. CUSTOM: A plan option that is used for clusters whose machine configs are not supported in self-service. All INVOICE clusters are under this plan option. SERVERLESS: A paid plan that runs on shared hardware and caps the users’ maximum monthly spending to a user-specified (possibly 0) amount. Allowed: DEDICATED┃CUSTOM┃SERVERLESS Returned: always |
|
Returned: always |
|
InternalDns is the internal DNS name of the cluster within the cloud provider’s network. It is used to connect to the cluster with PrivateLink or VPC peering. Returned: always |
|
cluster name Returned: always |
|
NodeCount will be 0 for serverless clusters. Returned: always |
|
SqlDns is the DNS name of SQL interface of the cluster. It is used to connect to the cluster with IP allowlisting. Returned: always |
|
UiDns is the DNS name used when connecting to the DB Console for the cluster. Returned: always |
|
LOCKED: An exclusive operation is being performed on this cluster. Other operations should not proceed if they did not set a cluster into the LOCKED state. Allowed: CREATING┃CREATED┃CREATION_FAILED┃DELETED┃LOCKED Returned: always |
|
Returned: always |
Authors
Cockroach Labs