2017-02-15 19:47:30 +01:00
|
|
|
---
|
2017-02-15 21:19:38 +01:00
|
|
|
layout: "backend-types"
|
2017-03-23 20:28:10 +01:00
|
|
|
page_title: "Backend Type: terraform enterprise"
|
2017-04-07 06:14:57 +02:00
|
|
|
sidebar_current: "docs-backends-types-standard-terraform-enterprise"
|
2017-02-15 19:47:30 +01:00
|
|
|
description: |-
|
2017-03-23 20:28:10 +01:00
|
|
|
Terraform can store the state in Terraform Enterprise
|
2017-02-15 19:47:30 +01:00
|
|
|
---
|
|
|
|
|
2017-03-23 20:28:10 +01:00
|
|
|
# terraform enterprise
|
2017-02-15 19:47:30 +01:00
|
|
|
|
2018-10-31 16:45:03 +01:00
|
|
|
-> **Deprecated** Please use the new enhanced [remote](/docs/backends/types/remote.html)
|
|
|
|
backend for storing state and running remote operations in Terraform Enterprise.
|
|
|
|
|
2017-02-15 21:19:38 +01:00
|
|
|
**Kind: Standard (with no locking)**
|
|
|
|
|
2018-07-10 00:28:30 +02:00
|
|
|
Reads and writes state from a [Terraform Enterprise](/docs/enterprise/index.html)
|
|
|
|
workspace.
|
2017-02-15 19:47:30 +01:00
|
|
|
|
2018-07-10 00:28:30 +02:00
|
|
|
-> **Why is this called "atlas"?** Before it was a standalone offering,
|
|
|
|
Terraform Enterprise was part of an integrated suite of enterprise products
|
|
|
|
called Atlas. This backend predates the current version Terraform Enterprise, so
|
|
|
|
it uses the old name.
|
2017-02-15 19:47:30 +01:00
|
|
|
|
2018-07-10 00:28:30 +02:00
|
|
|
This backend is useful for uncommon tasks like migrating state into a Terraform
|
|
|
|
Enterprise workspace, but we no longer recommend using it as part of your
|
|
|
|
day-to-day Terraform workflow. Since it performs runs outside of Terraform
|
|
|
|
Enterprise and updates state directly, it does not support Terraform
|
|
|
|
Enterprise's collaborative features like [workspace
|
|
|
|
locking](/docs/enterprise/run/index.html). To perform Terraform Enterprise runs
|
|
|
|
from the command line, use [Terraform Enterprise's CLI-driven
|
|
|
|
workflow](/docs/enterprise/run/cli.html) instead.
|
2017-04-07 17:36:49 +02:00
|
|
|
|
2017-02-15 21:19:38 +01:00
|
|
|
## Example Configuration
|
2017-02-15 19:47:30 +01:00
|
|
|
|
2017-04-05 17:29:27 +02:00
|
|
|
```hcl
|
2017-02-15 21:19:38 +01:00
|
|
|
terraform {
|
|
|
|
backend "atlas" {
|
2018-07-10 00:28:30 +02:00
|
|
|
name = "example_corp/networking-prod"
|
2018-08-02 02:33:11 +02:00
|
|
|
address = "https://app.terraform.io" # optional
|
2017-02-15 21:19:38 +01:00
|
|
|
}
|
|
|
|
}
|
2017-02-15 19:47:30 +01:00
|
|
|
```
|
|
|
|
|
2018-07-10 00:28:30 +02:00
|
|
|
We recommend using a [partial configuration](/docs/backends/config.html) and
|
|
|
|
omitting the access token, which can be provided as an environment variable.
|
2017-02-15 21:19:38 +01:00
|
|
|
|
2017-02-15 19:47:30 +01:00
|
|
|
## Example Referencing
|
|
|
|
|
2017-04-05 17:29:27 +02:00
|
|
|
```hcl
|
2017-02-15 19:47:30 +01:00
|
|
|
data "terraform_remote_state" "foo" {
|
2017-04-05 17:29:27 +02:00
|
|
|
backend = "atlas"
|
2018-10-29 17:22:21 +01:00
|
|
|
config = {
|
2018-07-10 00:28:30 +02:00
|
|
|
name = "example_corp/networking-prod"
|
2017-04-05 17:29:27 +02:00
|
|
|
}
|
2017-02-15 19:47:30 +01:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Configuration variables
|
|
|
|
|
|
|
|
The following configuration options / environment variables are supported:
|
|
|
|
|
2018-07-10 00:28:30 +02:00
|
|
|
* `name` - (Required) Full name of the workspace (`<ORGANIZATION>/<WORKSPACE>`).
|
|
|
|
* `ATLAS_TOKEN`/ `access_token` - (Required) A Terraform Enterprise [user API
|
|
|
|
token](/docs/enterprise/users-teams-organizations/users.html#api-tokens). We
|
|
|
|
recommend using the `ATLAS_TOKEN` environment variable rather than setting
|
|
|
|
`access_token` in the configuration.
|
2018-08-02 02:33:11 +02:00
|
|
|
* `address` - (Optional) The URL of a Terraform Enterprise instance. Defaults to
|
|
|
|
the SaaS version of Terraform Enterprise, at `"https://app.terraform.io"`; if
|
|
|
|
you use a private install, provide its URL here.
|