โฏ terraform -v
Terraform v0.12.23
variables.tf
:
variable "foo" {
type = string
}
terraform.tfvars
:
foo = bar
https://gist.github.com/steinybot/6d6fed5c27d7eb919a1c939521d57c20
Running terraform plan
should have read the variables from terraform.tfvars
.
โฏ terraform plan
Error: Variables not allowed
on terraform.tfvars line 1:
1: foo = bar
Variables may not be used here.
Error: No value for required variable
on variables.tf line 1:
1: variable "foo" {
The root module input variable "foo" is not set, and has no default value. Use
a -var or -var-file command line argument to provide a value for this
variable.
terraform plan
So the underlying issue is that I forgot to quote the value.
It should be:
foo = "bar"
not:
foo = bar
But this is a really terrible error message to get for this type of mistake.
Most helpful comment
So the underlying issue is that I forgot to quote the value.
It should be:
not:
But this is a really terrible error message to get for this type of mistake.