unknown token IDENT list error for IP address variable
13,404
The type parameter is a string - try passing "list"
into it.
variable "address_space" {
type = "list"
}
Related videos on Youtube
Author by
learner
Life is a constant learning journey. I am always hungry to learn new things. Never stop learning.
Updated on June 04, 2022Comments
-
learner almost 2 years
I have defined variable in my .tfvars variable as
variables.tfvars
address_space = ["10.197.0.0/16"]
build-windows.tf
variable "address_space" { type = list }
In build-windows.tf file I get the error as Unknow token ident list?
Not sure what I am doing wrong here, I even do not understand why terraform wants me to use the list instead of a string. When I use string I get an error in terraform plan stating that I have to use list.
Not going anywhere.
Please assist
-
learner over 5 yearsSuper! Worked :)
-
Daniel Agans about 5 yearswell that's def not whats in their docs, but it sure did work
-
StockB almost 5 yearsAs of v0.12, a variable type may be defined as an (unquoted) keyword: terraform.io/docs/configuration/variables.html