Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unknown token IDENT list error for IP address variable

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

like image 579
learner Avatar asked Oct 11 '18 00:10

learner


1 Answers

The type parameter is a string - try passing "list" into it.

variable "address_space" {
  type = "list"
}
like image 107
Benjamin Manns Avatar answered Oct 22 '22 23:10

Benjamin Manns