How can you pass variables to Terraform CLI console command?
Experience Level: Junior
Tags: Terraform
Answer
Run the following command:
terraform console -var 'foo=bar' -var 'abc=def'
or
terraform console -var-file=file
Related Terraform job interview questions
What format does variable definition file use in Terraform?
Terraform JuniorHow can you provide variables using file to Terraform CLI without the need to specify the name of the variable definition file?
Terraform JuniorUsing Terraform CLI, how can you experiment with Terraform interpolations?
Terraform JuniorThe Terraform CLI command terraform destroy is just a convenience alias. For which command?
Terraform JuniorHow do you approve changes presented by terraform apply command of Terraform CLI?
Terraform Junior