Skip to main content

Remote Plan

Remote Backend allows running your Terraform plan locally by triggering a remote plan in env zero.
The remote plan uses your local Terraform files but actually runs it remotely in env zero while using the shared state and variables set for the env zero environment. Each remote plan creates a deployment in env zero so you will have an audit for each deployment.
By running a remote plan you can build your IaC faster, and test your changes locally before committing them.
Additional benefits are the rest of the env zero features that are automatically integrated into your plan logs. It includes: .pngโ€) .pngโ€)

.terraformignore

If cases where your gitrepo is particularly large, this will cause the remote plan to take a longer time to process (due to compressing and decompressing the gitrepo). You can save time on the remote plan by adding a .terraformignore to the root of the repo.
.terraformignore
/**
!my-working-dir/
my-working-dir/.terraform
my-working-dir/.terraform/**
ignore the local .terraform folderIf you have a local .terraform folder, please add it to the ignore list (like in the example above), otherwise you may get some errors such as workspace not supported

Auditing

env zero UI can show you each remote plan deployment that has occurred, accesses its plan logs, and gives you visibility and audit on who actually trigged it from their local environment. .pngโ€)

Local Executions

If you still wish to run a plan or apply locally, without a remote execution by env zero - you can do it by enabling terraformโ€™s TF_FORCE_LOCAL_BACKEND environment variable.
TF_FORCE_LOCAL_BACKEND=1 terraform apply
Local ExecutionWhen running plan or apply locally, those deployments are not audited in env zero and RBAC and policy control are not enforced. In addition since the code you are running is not commited, we canโ€™t attach that deployment to a certain commit or a branch.You should avoid using Local Execution as much as possible.
โŒ˜I