» Terraform Enterprise Provider
The Terraform Enterprise provider is used to interact with the many resources supported by Terraform Enterprise. It supports both the SaaS version of Terraform Enterprise (app.terraform.io) and private instances.
Use the navigation to the left to read about the available resources.
» Authentication
This provider requires a Terraform Enterprise API token in order to manage resources.
To manage the full selection of resources, provide a user token from an account with appropriate permissions. This user should belong to the "owners" team of every Terraform Enterprise organization you wish to manage.
Note: You can use an organization or team token instead of a user token, but it will limit which resources you can manage. Organization and team tokens cannot manage resources across multiple organizations, and organization tokens cannot manage certain resource types (like SSH keys). See the Terraform Enterprise API documentation for more details about access to specific resources.
There are two ways to provide the required token:
- On the CLI, omit the
token
argument and set acredentials
block in your CLI config file. - In a Terraform Enterprise workspace, set
token
in the provider configuration. Use an input variable for the token and mark the corresponding variable in the workspace as sensitive.
» Example Usage
# Configure the Terraform Enterprise Provider
provider "tfe" {
hostname = "${var.hostname}"
token = "${var.token}"
}
# Create an organization
resource "tfe_organization" "org" {
# ...
}
» Argument Reference
The following arguments are supported:
-
hostname
- (Optional) The Terraform Enterprise hostname to connect to. Defaults toapp.terraform.io
. -
token
- (Optional) The token used to authenticate with Terraform Enterprise. Only set this argument when running in a Terraform Enterprise workspace; for CLI usage, omit the token from the configuration and set it ascredentials
in the CLI config file. See Authentication above for more.