fabiog1901.cockroachdb.cc_regions_info module – List the regions available for new clusters and nodes.

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_regions_info.

New in fabiog1901.cockroachdb 1.0.0

Synopsis

  • List the regions available for new clusters and nodes.

  • 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

api_client

string

Define details for the API client

api_version

string

The API version to use

Default: "latest"

cc_key

string

The Service Account API key

This value is log redacted

By default it reads the env variable ‘CC_KEY’

host

string

the hostname of the API server

Default: "cockroachlabs.cloud"

path

string

the path to the API endpoint

Default: ""

port

string

the port number, as a string, for the API server

Default: "443"

scheme

string

http or https

Choices:

  • "http"

  • "https" ← (default)

verify_ssl

boolean

whether the client should verify the server cert

Choices:

  • false

  • true ← (default)

provider

string

Optional CloudProvider for filtering.

Choices:

  • "AWS"

  • "GCP"

  • "ALL" ← (default)

serverless

boolean

Optional filter to only show regions available for serverless clusters.

Choices:

  • false ← (default)

  • true

Examples

- name: list CC regions in GCP excluding serverless
  fabiog1901.cockroachdb.cc_regions_info:
    provider: GCP
    serverless: 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

regions

list / elements=dictionary

A list of regions

Returned: always

Sample: [{"distance": 202.76012, "location": "N. Virginia", "name": "us-east4", "provider": "GCP", "serverless": false}]

distance

integer

Distance in miles, based on client IP address

Returned: always

location

string

region name

Returned: always

name

string

cloud provider location name

Returned: always

provider

string

provider name (AWS, GCP)

Returned: always

serverless

boolean

region available for serverless clusters

Returned: always

Authors

  • Cockroach Labs