esp.terraform.tfe_team_info (0.1.0) — module

List teams in the organization

| "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 teams in the organization.

Details on a team can be retrieved either by its ID or by its name.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Retrieve details on all teams in the organization, include additional information about users
  esp.terraform.tfe_team_info:
    url: 'https://terraform.example.com'
    token: '{{ token }}'
    organization: foo
    team:
      - '*'
    include:
      - users
    validate_certs: no
  register: _result
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Retrieve details on the given teams (supplied by names or IDs), in the organization
  esp.terraform.tfe_team_info:
    url: 'https://terraform.example.com'
    token: '{{ token }}'
    organization: foo
    team:
      - owners
      - team-VQ1FncissQs9Bom8
    validate_certs: no
  register: _result

Inputs

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

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

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

include:
    description:
    - Return additional information about nested resources.
    - This can be only C(users) as of now.
    elements: str
    required: false
    type: list

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:
    description:
    - Organization name.
    required: true
    type: str

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 teams.
      elements: dict
      returned: success
      sample:
      - attributes:
          name: owners
          organization-access:
            manage-policies: true
            manage-vcs-settings: true
            manage-workspaces: true
          permissions:
            can-destroy: false
            can-update-api-token: true
            can-update-membership: true
            can-update-organization-access: false
            can-update-visibility: false
          users-count: 1
          visibility: secret
        id: team-VQ1FncissQs9Bom8
        links:
          self: /api/v2/teams/team-VQ1FncissQs9Bom8
        relationships:
          authentication-token:
            meta: {}
          organization:
            data:
              id: foo
              type: organizations
          organization-memberships:
            data:
            - id: ou-SKVvnWhoTxWrofkE
              type: organization-memberships
          users:
            data:
            - id: user-K1LWGyjmnDL59y4H
              type: users
        type: teams
      type: list
  description: Details on teams.
  returned: success
  type: dict