confluent.cloud.cluster (0.1.0) — module

Manage Confluent Cloud clusters

| "added in version" 0.0.1 of confluent.cloud"

Authors: Keith Resar (@keithresar)

Install collection

Install with ansible-galaxy collection install confluent.cloud:==0.1.0


Add to requirements.yml

  collections:
    - name: confluent.cloud
      version: 0.1.0

Description

Manage Confluent Cloud clusters.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create new cluster
  confluent.cloud.cluster:
    state: present
    environment: env-f3a90de
    name: MyCluster
    availability: SINGLE_ZONE
    cloud: GCP
    region: us-west4
    kind: Basic
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove existing cluster (by id)
  confluent.cloud.cluster_info:
    state: absent
    environment: env-f3a90de
    id: lkc-6wkr2
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove existing cluster (by name)
  confluent.cloud.cluster_info:
    state: absent
    environment: env-f3a90de
    name: MyCluster

Inputs

    
id:
    description: Cluster Id
    type: str

cku:
    default: 1
    description:
    - The number of Confluent Kafka Units (CKUs) for Dedicated cluster types.
    - MULTI_ZONE dedicated clusters must have at least two CKUs.
    type: int

kind:
    choices:
    - Basic
    - Standard
    - Dedicated
    default: Basic
    description:
    - Cluster type.
    - Only Basic -> Standard changes are available after deployment.
    type: str

name:
    description:
    - Cluster name.
    - Mutation after creation requires supplying the cluster id.
    type: str

cloud:
    choices:
    - AWS
    - GCP
    - AZURE
    description:
    - The cloud service provider in which the cluster is running.
    - Immutable after deployment.
    type: str

state:
    choices:
    - absent
    - present
    default: present
    description:
    - If `absent`, the cluster and all objects (connectors, service accounts) will be
      removed. Note that absent will not cause Cluster to fail if the Cluster does not
      exist.
    - If `present`, the cluster will be created.
    type: str

region:
    description:
    - The cloud service provider region where the cluster is running.
    - Immutable after deployment.
    type: str

api_key:
    description: Confluent Cloud API Key
    required: true
    type: str

network:
    description: The network associated with this object.
    type: str

api_secret:
    description: Confluent Cloud API Secret
    required: true
    type: str

api_retries:
    default: 5
    description: Amount of max retries for the API requests.
    type: int

api_timeout:
    default: 60
    description: Timeout used for the API requests.
    type: int

environment:
    description:
    - The environment to which this belongs.
    - Immutable after deployment.
    required: true
    type: str

api_endpoint:
    default: https://api.confluent.cloud
    description: Endpoint used for the API requests.
    type: str

availability:
    choices:
    - SINGLE_ZONE
    - MULTI_ZONE
    default: SINGLE_ZONE
    description:
    - The availability zone configuration of the cluster.
    - Immutable after deployment.
    type: str

encryption_key:
    description:
    - The id of the encryption key that is used to encrypt the data in the Kafka cluster.
      (e.g. for Amazon Web Services, the Amazon Resource Name of the key).
    - Only available for Dedicated clusters.
    type: str

validate_certs:
    default: true
    description: Whether to vaidate API endpoint TLS certs
    type: bool

api_retry_max_delay:
    default: 12
    description: Exponential backoff delay in seconds between retries up to this max delay
      value.
    type: int

Outputs

id:
  description: Cluster id
  returned: success
  sample: lkc-7yxkd2
  type: str
metadata:
  description: Cluster metadata, including create timestamp and updated timestamp
  returned: success
  type: dict
resource_uri:
  description: Globally unique URI for resource
  returned: success
  sample: crn://confluent.cloud/organization=6830dbfe-5057-4e65-ae2e-f6a090640ec0/environment=env-nvm8yz
  type: str
spec:
  contains:
    api_endpoint:
      description: API endpoint
      returned: success
      sample: https://pkac-4nd3z.us-west4.gcp.confluent.cloud
      type: str
    availability:
      description: The availability zone configuration of the cluster
      returned: success
      sample: SINGLE_ZONE
      type: str
    cloud:
      description: The cloud service provider in which the cluster is running (AWS,
        GCP, AZURE)
      returned: success
      sample: AWS
      type: str
    config:
      contains:
        kind:
          description: The configuration of the Kafka cluster.
          returned: success
          sample: Basic
          type: str
      description: The configuration of the Kafka cluster.
      returned: success
      type: dict
    display_name:
      description: The name of the cluster
      returned: success
      type: str
    environment:
      contains:
        id:
          description: Id of the referred resource
          returned: success
          sample: env-12m16j
          type: str
      description: The environment to which this belongs
      returned: success
      type: dict
    http_endpoint:
      description: The cluster HTTP request UR
      returned: success
      sample: https://pkc-lzvrd.us-west4.gcp.confluent.cloud:443
      type: str
    kafka_bootstrap_endpoint:
      description: The bootstrap endpoint used by Kafka clients to connect to the
        cluster
      returned: success
      sample: SASL_SSL://pkc-lzvrd.us-west4.gcp.confluent.cloud:9092
      type: str
    network:
      contains:
        environment:
          description: Environment of the referred resource, if env-scoped
          returned: success
          type: str
        id:
          description: Id of the referred resource
          returned: success
          type: str
      description: The network associated with this object
      returned: success
      type: dict
    region:
      description: The cloud service provider region where the cluster is running
      returned: success
      sample: us-west4
      type: str
    status:
      contains:
        cku:
          description: The number of Confluent Kafka Units (CKUs) the Dedicated cluster
            currently has
          returned: success
          sample: 1
          type: int
        phase:
          description:
          - 'The lifecyle phase of the cluster:'
          - 'PROVISIONED: cluster is provisioned;'
          - 'PROVISIONING: cluster provisioning is in progress;'
          - 'FAILED: provisioning failed'
          returned: success
          sample: PROVISIONED
          type: str
      description: The status of the cluster
      returned: success
      type: dict
  description: Cluster spec
  returned: success
  type: dict