confluent.cloud.role_binding_info (0.1.0) — module

Get information on existing role bindings

| "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

Enumerate and filter role bindings within a Confluent Cloud environment.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get context for a specific environment
  confluent.cloud.environment_info:
    ids:
      - env-yoxp06
  register: result
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: List all role bindings in a given environment
  confluent.cloud.role_binding_info:
    resource_uri: "{{ result.resource_uri }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: List all role bindings for a specific user in a given environment
  confluent.cloud.role_binding_info:
    resource_uri: "{{ result.resource_uri }}"
    principals:
      - User:u-l6xn83
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: List all role bindings for with specific roles in a given environment
  confluent.cloud.role_binding_info:
    resource_uri: "{{ result.resource_uri }}"
    roles:
      - EnvironmentAdmin
      - MetricsViewer

Inputs

    
roles:
    description:
    - List of roles to filter results by
    - Mutually exclusive when used with `principals`.
    elements: str
    type: list

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

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

principals:
    description:
    - List of principals to filter results by
    - Mutually exclusive when used with `roles`.
    elements: str
    type: list

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

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

resource_uri:
    description:
    - URI (crn://) associated with the resource in which to search
    required: true
    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

role_bindings:
  contains:
    id:
      description: Role binding id
      returned: success
      sample: rb-y3mDg
      type: str
    metadata:
      description: User metadata, including create timestamp and updated timestamp
      returned: success
      type: dict
    principal:
      description: Principal that role binding applies to
      returned: success
      sample: User:u-l6xn83
      type: str
    role:
      description: Role that role binding applies to
      returned: success
      sample: EnvironmentAdmin
      type: str
  description: Dictionary of matching role bindings, keyed by role binding id
  returned: success
  type: dict