When runs are performed in Terraform Enterprise (TFE), an
ATLAS_TOKEN istypically automatically generated by TFE to provide access to all of the organization’s resources. This token has access to the organization’s other workspaces, such that a Terraform remote state resource does not need to explicitly set
access_token, since the resource will fall back to using the existing
When using Terraform Enterprise to refer to a remote state in another organization (such as when accessing a legacy organization’s environment from a new organization’s workspace), the ATLAS_TOKEN instead needs to be set explicity, since it must have access to both organizations.
To do this, generate a user account token from the account settings (not an organization token) where the user has sufficient access on both organizations to perform any desired operations.
The generated token can then be set as the value for the
ATLAS_TOKEN environment variable. With this option, the provided value will override the automatically generated
Alternatively, you can enter the value in the
access_token configuration variable of the Terraform remote state data source backend configuration. Consult the Terraform Enterprise backend access_token reference for details.
Note that the variable in the backend configuration is
access_token and not