esp / esp.terraform / 0.1.0 / module / tfe_team_token Generate and delete the team token | "added in version" 0.1.0 of esp.terraform" Authors: Krzysztof Lewandowski (@klewan)esp.terraform.tfe_team_token (0.1.0) — module
Install with ansible-galaxy collection install esp.terraform:==0.1.0
collections: - name: esp.terraform version: 0.1.0
Generates a new team token and deletes the existing token.
- name: Generate a new team token esp.terraform.tfe_team_token: url: 'https://terraform.example.com' token: '{{ token }}' organization: foo team: developers state: present validate_certs: no register: _result
- debug: msg: "{{ _result.json.data.attributes.token }}"
- name: Destroy the team token esp.terraform.tfe_team_token: url: 'https://terraform.example.com' token: '{{ token }}' organization: foo team: developers state: absent validate_certs: no
url: description: - Terraform Enterprise URL. required: false type: str team: description: - Terraform Team. - The team may be referred either by its id or its name. required: true type: str sleep: default: 5 description: - Number of seconds to sleep between API retries. type: int state: choices: - absent - present default: present description: - Whether the team token should exist or not. required: true type: str 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: 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
json: contains: data: description: Details on team token. returned: success sample: attributes: created-at: '2021-04-27T06:30:13.827000+00:00' description: null last-used-at: null token: 9cYRjBE....WuvlXJ0dI id: at-6Ljdprm87HYE5oVB relationships: created-by: data: id: user-K1LWGyjmnDL59y4H type: users type: authentication-tokens type: dict description: Details on team token. returned: success type: dict