fabiog1901.cockroachdb.cc_logexport_info module – Get the Log Export configuration for a cluster.

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

New in fabiog1901.cockroachdb 1.0.0

Synopsis

  • Get the Log Export configuration for a cluster.

  • 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)

cluster_id

string

The UUID or name of the cluster.

Examples

- name: show log export config for my cluster
  fabiog1901.cockroachdb.cc_logexport_info:
    cluster_id: 9592afea-2bf8-4dc1-95ec-9369b7f684ca
    api_client:
      api_version: '2022-09-20'

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

logexport

dictionary

LogExportClusterInfo contains a package of information that fully describes both the intended state of the log export configuration for a specific cluster but also some metadata around its deployment status, any error messages, and some timestamps.

Returned: success

cluster_id

string

Returned: always

created_at

string

Returned: always

spec

dictionary

LogExportClusterSpecification contains all the data necessary to configure log export for an individual cluster.

Users would supply this data via the API and also receive it back when inspecting the state of their log export configuration.

Returned: always

auth_principal

string

auth_principal is either the AWS Role ARN that identifies a role that the cluster account can assume to write to CloudWatch or the GCP Project ID that the cluster service account has permissions to write to for cloud logging.

Returned: always

log_name

string

log_name is an identifier for the logs in the customer’s log sink.

Returned: always

type

string

LogExportType encodes the cloud selection that we’re exporting to along with the cloud logging platform. Currently, each cloud has a single logging platform.

Allowed: AWS_CLOUDWATCH┃GCP_CLOUD_LOGGING

Returned: success

status

string

LogExportStatus encodes the possible states that a configuration can be in as it is created, deployed, and disabled.

Allowed: DISABLED┃DISABLING┃DISABLE_FAILED┃ENABLED┃ENABLING┃ENABLE_FAILED

Returned: always

updated_at

string

Returned: always

user_message

string

Returned: always

Authors

  • Cockroach Labs