gcore.cloud.secret_info (1.0.1) — module

Gather infos about all GCore secrets.

Authors: GCore (@GCore)

Install collection

Install with ansible-galaxy collection install gcore.cloud:==1.0.1


Add to requirements.yml

  collections:
    - name: gcore.cloud
      version: 1.0.1

Description

Gather infos about all GCore secrets.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Gather gcore secrets info
  gcore.cloud.secret_info:
    api_key: "{{ api_key }}"
    region_id: "{{ region_id }}"
    project_id: "{{ project_id }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Gather gcore specific secret info
  gcore.cloud.secret_info:
    api_key: "{{ api_key }}"
    region_id: "{{ region_id }}"
    project_id: "{{ project_id }}"
    secret_id: "{{ secret_id }}"

Inputs

    
api_key:
    description:
    - GCore API auth key
    - Can be passed as I(CLOUD_API_KEY) environment variable.
    type: str

api_host:
    default: https://api.gcore.com/cloud
    description:
    - GCore API base host
    - Can be passed as I(CLOUD_API_HOST) environment variable.
    type: str

region_id:
    description:
    - GCore API region ID
    - Required if I(region_name) is not passed
    - Can be passed as I(CLOUD_REGION_ID) environment variable.
    type: int

secret_id:
    description:
    - The ID of secret you want to get.
    - The module will fail if the provided ID is invalid.
    required: false
    type: str

project_id:
    description:
    - GCore API project ID
    - Required if I(project_name) is not passed
    - Can be passed as I(CLOUD_PROJECT_ID) environment variable.
    type: int

api_timeout:
    default: 30
    description:
    - Timeout in seconds to polling GCore API
    type: int

region_name:
    description:
    - GCore API region name
    - Required if I(region_id) is not passed
    - Can be passed as I(CLOUD_REGION_NAME) environment variable.
    type: str

project_name:
    description:
    - GCore API project name
    - Required if I(project_id) is not passed
    - Can be passed as I(CLOUD_PROJECT_NAME) environment variable.
    type: str

Outputs

secret_info:
  contains:
    algorithm:
      description: Metadata provided by a user or system for informational purposes
      returned: always
      sample: aes
      type: str
    bit_length:
      description: Metadata provided by a user or system for informational purposes
      returned: always
      sample: 256
      type: int
    content_types:
      description: Describes the content-types that can be used to retrieve the payload
      returned: always
      sample:
        default: application/octet-stream
      type: dict
    created:
      description: Datetime when the secret was created
      returned: always
      sample: '2023-03-23T20:00:00+00:00'
      type: str
    expiration:
      description: Datetime when the secret will expire
      returned: always
      sample: '2023-06-23T20:00:00+00:00'
      type: str
    id:
      description: Secret ID
      returned: always
      sample: bfc7824b-31b6-4a28-a0c4-7df137139215
      type: str
    mode:
      description: Metadata provided by a user or system for informational purposes
      returned: always
      sample: cbc
      type: str
    name:
      description: Secret name
      returned: always
      sample: AES key
      type: str
    secret_type:
      description: Secret type, base64 encoded.
      returned: always
      sample: opaque
      type: str
    status:
      description: Status
      returned: always
      sample: ACTIVE
      type: str
  description:
  - When I(secret_id) is passed, it is a dict of resource.
  - Otherwise it is a list of dictionaries.
  returned: always
  type: complex

See also