No description
  • Go 99.5%
  • Shell 0.2%
  • HCL 0.2%
Find a file
OpenTofu Core Development Team a037e936ce Apply GitHub workflow changes
2026-04-02 16:33:43 +00:00
.github Apply GitHub workflow changes 2026-04-02 16:33:43 +00:00
.release [COMPLIANCE] Add Copyright and License Headers (#1717) 2025-05-22 10:58:26 -07:00
docs [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 3) (#1919) 2025-12-09 11:35:18 -08:00
examples/workspaces_variables [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 3) (#1919) 2025-12-09 11:35:18 -08:00
internal Fix missing identity on read-after-delete for variables, projects and stacks 2026-04-01 13:57:43 -07:00
META.d [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 3) (#1919) 2025-12-09 11:35:18 -08:00
scripts [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 3) (#1919) 2025-12-09 11:35:18 -08:00
version release prep for v0.76.1 2026-04-02 12:02:19 -04:00
website/docs release prep for v0.76.1 2026-04-02 12:02:19 -04:00
.copywrite.hcl Add copywrite headers and GH Action 2023-01-27 15:34:44 -06:00
.gitignore assessments, desc, auto-apply working 2025-07-11 15:23:46 -04:00
.golangci.yml Upgrade several dependencies (#1911) 2025-12-02 09:31:49 -08:00
CHANGELOG.md release prep for v0.76.1 2026-04-02 12:02:19 -04:00
GNUmakefile feat: add tfe_organization_token ephemeral resource (#1616) 2025-03-10 10:43:04 -07:00
go.mod TF-33573 adding resource_tfe_project_policy_set_exclusion (#1990) 2026-03-31 00:18:05 +05:30
go.sum TF-33573 adding resource_tfe_project_policy_set_exclusion (#1990) 2026-03-31 00:18:05 +05:30
LICENSE [COMPLIANCE] Update MPL 2.0 LICENSE 2022-10-12 20:45:00 +00:00
main.go [COMPLIANCE] Update Copyright and License Headers (Batch 1 of 3) (#1919) 2025-12-09 11:35:18 -08:00
mkdocs.yml Nudge contributors to create new resources in Provider Framework 2024-01-12 11:47:14 -07:00
README.md release prep for v0.76.1 2026-04-02 12:02:19 -04:00
terraform-registry-manifest.json setting to just protocol 6 2025-08-18 10:28:17 -06:00

Terraform

HCP Terraform and Terraform Enterprise Provider

The official Terraform provider for HCP Terraform and Terraform Enterprise.

As Terraform Enterprise is a self-hosted distribution of HCP Terraform, this provider supports both Cloud and Enterprise use cases. In all/most documentation, the platform will always be stated as 'Terraform Enterprise' - but a feature will be explicitly noted as only supported in one or the other, if applicable (rare).

Note this provider is in beta and is subject to change (though it is generally quite stable). We will indicate any breaking changes by releasing new versions. Until the release of v1.0, any minor version changes will indicate possible breaking changes. Patch version changes will be used for both bugfixes and non-breaking changes.

Installation

Declare the provider in your configuration and terraform init will automatically fetch and install the provider for you from the Terraform Registry:

terraform {
  required_providers {
    tfe = {
      version = "~> 0.76.1"
    }
  }
}

For production use, you should constrain the acceptable provider versions via configuration (as above), to ensure that new versions with breaking changes will not be automatically installed by terraform init in the future. As this provider is still at version zero, you should constrain the acceptable provider versions on the minor version.

The above snippet using required_providers is for Terraform 0.13+; if you are using Terraform version 0.12, you can constrain by adding the version constraint to the provider block instead:

provider "tfe" {
  version = "~> 0.76.1"
  ...
}

Since v0.24.0, this provider requires Terraform >= 0.12

Since v0.70.0, this provider requires Terraform >= 1.0

For more information on provider installation and constraining provider versions, see the Provider Requirements documentation.

Usage

Create a user or team API token in HCP Terraform or Terraform Enterprise, and use the token in the provider configuration block:

provider "tfe" {
  hostname = var.hostname # Optional, for use with Terraform Enterprise. Defaults to app.terraform.io.
  token    = var.token
}

# Create an organization
resource "tfe_organization" "org" {
  # ...
}

There are several other ways to configure the authentication token, depending on your use case. For other methods, see the Authentication documentation

For more information on configuring providers in general, see the Provider Configuration documentation.

Development

We have developed some guidelines to help you learn more about compiling the provider, using it locally, and contributing suggested changes in the contributing guide.