delowan.googlecloud.gcp_kms_crypto_key_info (1.0.2) — module

Gather info for GCP CryptoKey

Authors: Google Inc. (@googlecloudplatform)

preview | supported by community

Install collection

Install with ansible-galaxy collection install delowan.googlecloud:==1.0.2


Add to requirements.yml

  collections:
    - name: delowan.googlecloud
      version: 1.0.2

Description

Gather info for GCP CryptoKey


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: get info on a crypto key
  gcp_kms_crypto_key_info:
    key_ring: projects/{{ gcp_project }}/locations/us-central1/keyRings/key-key-ring
    project: test_project
    auth_kind: serviceaccount
    service_account_file: "/tmp/auth.pem"

Inputs

    
scopes:
    description:
    - Array of scopes to be used
    elements: str
    type: list

project:
    description:
    - The Google Cloud Platform project to use.
    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

key_ring:
    description:
    - The KeyRing that this key belongs to.
    - 'Format: `''projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}''`.'
    required: true
    type: str

auth_kind:
    choices:
    - application
    - machineaccount
    - serviceaccount
    description:
    - The type of credential used.
    required: true
    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 time that this resource was created on the server.
      - This is in RFC3339 text format.
      returned: success
      type: str
    keyRing:
      description:
      - The KeyRing that this key belongs to.
      - 'Format: `''projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}''`.'
      returned: success
      type: str
    labels:
      description:
      - Labels with user-defined metadata to apply to this resource.
      returned: success
      type: dict
    name:
      description:
      - The resource name for the CryptoKey.
      returned: success
      type: str
    nextRotationTime:
      description:
      - The time when KMS will create a new version of this Crypto Key.
      returned: success
      type: str
    purpose:
      description:
      - Immutable purpose of CryptoKey. See U(https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys#CryptoKeyPurpose)
        for inputs.
      returned: success
      type: str
    rotationPeriod:
      description:
      - Every time this period passes, generate a new CryptoKeyVersion and set it
        as the primary.
      - The first rotation will take place after the specified period. The rotation
        period has the format of a decimal number with up to 9 fractional digits,
        followed by the letter `s` (seconds). It must be greater than a day (ie, 86400).
      returned: success
      type: str
    skipInitialVersionCreation:
      description:
      - If set to true, the request will create a CryptoKey without any CryptoKeyVersions.
        You must use the `google_kms_key_ring_import_job` resource to import the CryptoKeyVersion.
      returned: success
      type: bool
    versionTemplate:
      contains:
        algorithm:
          description:
          - The algorithm to use when creating a version based on this template.
          - See the [algorithm reference](U(https://cloud.google.com/kms/docs/reference/rest/v1/CryptoKeyVersionAlgorithm))
            for possible inputs.
          returned: success
          type: str
        protectionLevel:
          description:
          - The protection level to use when creating a version based on this template.
          returned: success
          type: str
      description:
      - A template describing settings for new crypto key versions.
      returned: success
      type: complex
  description: List of resources
  returned: always
  type: complex