You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where ENVIRONMENT is the env set in atlantis plan environment
Expected Result
When I comment on the PR to do atlantis plan my-environment, it should run `terraform init -backend-config=env/my-environment.backend.tfvars
Actual Result
I get an error report from Atlantis stating
exit status 1: running "terraform init -no-color -backend-config=env/${ENVIRONMENT}.backend.tfvars" in "/home/shih.liong/.atlantis/repos/RCA-techops/atlantis-test-allinone/1/sandbox-us-west-2/terraform":
invalid value "env/${ENVIRONMENT}.backend.tfvars" for flag -backend-config: Error reading env/${ENVIRONMENT}.backend.tfvars: open env/${ENVIRONMENT}.backend.tfvars: no such file or directory
Usage: terraform init [options] [DIR]
...
Description
I am trying to add additional arguments to the init stage of Terraform.
In our setup, we actually have a custom backend configs per environment. As such we need to initialize Terraform with our custom backend config file each time.
Without this, we cannot correctly start up the Terraform setup on each repo per environment.
The text was updated successfully, but these errors were encountered:
@mechastorm Thanks for opening up this issue. We currently only support the environment variables in pre_plan, pre_apply, post_plan and post_apply steps, not in the extra arguments for commands for terraform. This should be an easy fix. Will let you know when we have a fix ready for this.
Repro
atlantis.yml
where
ENVIRONMENT
is the env set inatlantis plan environment
Expected Result
When I comment on the PR to do
atlantis plan my-environment
, it should run `terraform init -backend-config=env/my-environment.backend.tfvarsActual Result
I get an error report from Atlantis stating
Description
I am trying to add additional arguments to the
init
stage of Terraform.In our setup, we actually have a custom backend configs per environment. As such we need to initialize Terraform with our custom backend config file each time.
Without this, we cannot correctly start up the Terraform setup on each repo per environment.
The text was updated successfully, but these errors were encountered: