Deploy your infrastructure via a CircleCI pipeline using the Terraform orb. Integrate Infrastructure-as-Code (IaC) to help provision and manage any cloud, infrastructure, or service of your choice.
create repo with a tfvar file that is outside of the module path, or directory that is set as current working directory
set the command for terraform/plan similar to
- terraform/plan:
var_file: ${HOME}/common.tfvars
Expected behavior
the terraform/plan command will run because the script passes the test to confirm that the file exists. And not fail with the following error
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
var file '${HOME}/common.tfvars' wasn't found
Exited with code exit status 1
NOTE
This is a duplicate of #56 as the 3.1.0 release did not fix the problem
Orb Version 3.0.0 and 3.1.0
Describe the bug In 2.1.0 you can pass in a absolute path to a var-file. which was honoured by https://github.com/CircleCI-Public/terraform-orb/blob/ac023bd48a8b48ac47da5f20fbd34e4b856dd6bf/src/commands/plan.yml#L98 however in the move to 3.0.0 this check was removed
To Reproduce
Expected behavior
the
terraform/plan
command will run because the script passes the test to confirm that the file exists. And not fail with the following errorNOTE
This is a duplicate of #56 as the 3.1.0 release did not fix the problem