Documentation Index
Fetch the complete documentation index at: https://docs.envzero.com/llms.txt
Use this file to discover all available pages before exploring further.
Local Login to env zero Remote Backend
Remote backends allow running your Terraform deployments both on env zero and locally with access to the remote state. To use the Remote Backend locally, you must log in for your requests will be authorized.To login, ensure the following conditions are met:
- You have a login Token
- The current path is the directory of the Terraform stack
- The Terraform stack defines a properly configured env zero backend
backend.tf
A note regarding the PROJECT_ID in the backend configurationThe PROJECT_ID is only required if the env zero environment does not exist in the env zero UI. For example, if this is the first time you are creating a new env zero environment with the env zero remote backend configuration, you need to specify the PROJECT_ID so that env zero will know where to put your new env zero environment. Otherwise, if you are updating the backend configuration for an existing env zero environment, you do not need to specify the PROJECT_ID.
- Run
terraform login backend.api.env0.com - Enter
yeswhen prompted - Insert your
token
A note regarding Module Registry & Remote BackendTechnically, the two services are hosted on different api endpoints, so to use both the module registry and the remote backend with the same API key, you will have to also set up the token for
api.env0.com. Please see the section on Private Registry authorization for more details.Generating a Token
To generate a token, you must create a Personal API Key.After the API Key has been created, the token will be listed under the
Using it locally for Remote Backend.Alternatively, Admins can create an API Key with a specific role.
Logout
In case you need to logout, you can browse tobackend.api.env0.com/logout/{Token}
Next steps
- Running Remote Plan - Run Terraform plans remotely via env zero after logging in.
- Running Remote Apply - Apply Terraform changes remotely through env zero.
- User API Keys - Generate and manage the API keys used for authentication.