esp.terraform.tfe_organization_info (0.1.0) — module

List Terraform Enterprise organizations

| "added in version" 0.1.0 of esp.terraform"

Authors: Krzysztof Lewandowski (@klewan)

Install collection

Install with ansible-galaxy collection install esp.terraform:==0.1.0


Add to requirements.yml

  collections:
    - name: esp.terraform
      version: 0.1.0

Description

Lists Terraform Enterprise organizations.

Details on an organization can be retrieved either by its external-id or by its name.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Retrieve details on all organizations
  esp.terraform.tfe_organization_info:
    url: 'https://terraform.example.com'
    token: '{{ token }}'
    organization:
      - '*'
    validate_certs: no
  register: _result
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Retrieve details on given organizations (supplied by names or IDs)
  esp.terraform.tfe_organization_info:
    url: 'https://terraform.example.com'
    token: '{{ token }}'
    organization:
      - foo
      - org-ujAdbddGRe7dn6NU
    validate_certs: no
  register: _result

Inputs

    
url:
    description:
    - Terraform Enterprise URL.
    required: false
    type: str

sleep:
    default: 5
    description:
    - Number of seconds to sleep between API retries.
    type: int

token:
    description:
    - All requests to Terraform Enterprise must be authenticated with a bearer token.
    - There are three kinds of token available, i.e. user tokens, team tokens and organization
      tokens.
    - See L(Authentication,https://www.terraform.io/docs/cloud/api/index.html#authentication).
    required: true
    type: str

retries:
    default: 3
    description:
    - Number of retries to call Terraform API URL before failure.
    type: int

use_proxy:
    default: true
    description:
    - If C(no), it will not use a proxy, even if one is defined in an environment variable
      on the target hosts.
    type: bool

organization:
    default:
    - '*'
    description:
    - List of organizations to retrieve details for.
    - This can be '*' which means all organizations.
    - One may refer to a workspace either by its external-id or its name.
    required: false
    type: list

validate_certs:
    default: true
    description:
    - If C(no), SSL certificates will not be validated.
    - This should only set to C(no) used on personally controlled sites using self-signed
      certificates.
    type: bool

Outputs

json:
  contains:
    data:
      description: Details on organizations.
      elements: dict
      returned: success
      sample:
      - attributes:
          collaborator-auth-policy: password
          cost-estimation-enabled: true
          created-at: '2021-04-21T13:14:31.465000+00:00'
          email: admin@example.com
          external-id: org-ujAdbddGRe7dn6NU
          fair-run-queuing-enabled: false
          global-module-sharing: false
          module-consuming-organizations-count: 0
          name: foo
          owners-team-saml-role-id: null
          permissions:
            can-access-via-teams: true
            can-create-module: true
            can-create-team: true
            can-create-workspace: true
            can-destroy: true
            can-manage-sso: false
            can-manage-subscription: true
            can-manage-users: true
            can-start-trial: false
            can-traverse: true
            can-update: true
            can-update-agent-pools: false
            can-update-api-token: true
            can-update-oauth: true
            can-update-sentinel: true
            can-update-ssh-keys: true
          plan-expired: false
          plan-expires-at: null
          plan-is-enterprise: false
          plan-is-trial: false
          saml-enabled: true
          session-remember: null
          session-timeout: null
          two-factor-conformant: false
        id: foo
        links:
          self: /api/v2/organizations/foo
        relationships:
          authentication-token:
            links:
              related: /api/v2/organizations/foo/authentication-token
          entitlement-set:
            data:
              id: org-ujAdbddGRe7dn6NU
              type: entitlement-sets
            links:
              related: /api/v2/organizations/foo/entitlement-set
          module-producers:
            links:
              related: /api/v2/organizations/foo/relationships/module-producers
          oauth-tokens:
            links:
              related: /api/v2/organizations/foo/oauth-tokens
          subscription:
            links:
              related: /api/v2/organizations/foo/subscription
        type: organizations
      type: list
  description: Details on organizations.
  returned: success
  type: dict
organization:
  description: List of organizations to retrieve details for.
  elements: dict
  returned: always
  sample:
  - foo
  type: list