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
Terraform has changed since the course was written such that the terraform init command described in section 03_05-06_multi_environment no longer works.
Describe your environment
Following the course exactly
Steps to Reproduce
Clone this repo
cd advanced-terraform-course/03_05-06_multi_environment/environments/0_development
terraform init ../../manifests
Expected Behavior
Terraform init completes
Current Behavior
Error: Too many command line arguments. Did you mean to use -chdir?
The variables still need to be read from the current directory during plan and (presumably) apply, so we need to do something like the following:
TF_DATA_DIR="$PWD/.terraform" terraform -chdir=../../manifests/ plan \
-var-file="$PWD/development.auto.tfvars" -out=s1.tfplan
This is still not quite the same as suggested as it leaves the .terraform.lock.hcl file in the manifests directory. I don't know enough to know whether this is a problem that needs to be fixed.
Issue Overview
Terraform has changed since the course was written such that the
terraform init
command described in section 03_05-06_multi_environment no longer works.Describe your environment
Following the course exactly
Steps to Reproduce
cd advanced-terraform-course/03_05-06_multi_environment/environments/0_development
Expected Behavior
Terraform init completes
Current Behavior
Error:
Too many command line arguments. Did you mean to use -chdir?
Possible Solution
Run the following command instead for the init
TF_DATA_DIR="$PWD/.terraform" terraform -chdir=../../manifests/ init
The variables still need to be read from the current directory during plan and (presumably) apply, so we need to do something like the following:
This is still not quite the same as suggested as it leaves the .terraform.lock.hcl file in the manifests directory. I don't know enough to know whether this is a problem that needs to be fixed.
See the terraform release notes for more information.
The text was updated successfully, but these errors were encountered: