aiyor.gcp.gcp_secretmanager_info (1.0.1) — module

Gather info for GCP Secret Manager - List secrets and versions metadata.

Authors: Tze L. (https://github.com/tl-aiyor)

preview | supported by community

Install collection

Install with ansible-galaxy collection install aiyor.gcp:==1.0.1


Add to requirements.yml

  collections:
    - name: aiyor.gcp
      version: 1.0.1

Description

Gather info for GCP Secret Manager


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: get list of secrets and the associated versions - secret payload excluded
  gcp_secretmanager_info:
    project: "{{ project_id }}"
    auth_kind: application

Inputs

    
scopes:
    default: https://www.googleapis.com/auth/cloud-platform
    description:
    - Array of scopes to be used
    elements: str
    type: list

project:
    default: environment variable 'GCP_PROJECT'
    description:
    - The name of the GCP Project. This is the Project number.
    type: str

env_type:
    description:
    - Specifies which Ansible environment you're running this module within.
    - This should not be set unless you know what you're doing.
    - This only alters the User Agent string for any API requests.
    type: str

auth_kind:
    choices:
    - application
    - machineaccount
    - serviceaccount
    - accesstoken
    description:
    - The type of credential used.
    required: true
    type: str

access_token:
    description:
    - An OAuth2 access token if credential type is accesstoken.
    type: str

service_account_file:
    description:
    - The path of a Service Account JSON file if serviceaccount is selected as type.
    type: path

service_account_email:
    description:
    - An optional service account email address if machineaccount is selected and the
      user does not wish to use the default email.
    type: str

service_account_contents:
    description:
    - The contents of a Service Account JSON file, either in a dictionary or as a JSON
      string that represents it.
    type: jsonarg

Outputs

resources:
  contains:
    createTime:
      description:
      - The creation time of the secret
      type: str
    etag:
      description:
      - See reference for more info: https://cloud.google.com/secret-manager/docs/etags
      returned: success
      type: str
    name:
      description:
      - The full name of the secret (e.g., projects/111111111111/secrets/mysecret).
      returned: success
      type: str
    versions:
      contains:
        createTime:
          description:
          - The creation time of the secret version
          type: str
        etag:
          description:
          - See reference for more info: https://cloud.google.com/secret-manager/docs/etags
          type: str
        name:
          description:
          - The full name of the secret version (e.g., projects/111111111111/secrets/mysecret/versions/1).
          type: str
        state:
          description:
          - The state of the version.  ENABLED or DISABLED
          type: str
      description:
      - An array consists of list of secret version metadata.
      - This does not include
      returned: success
      type: complex
  description: List of resources
  returned: always
  type: complex