Skip to main content

โ€œThe root module input variable โ€˜[variable_name]โ€™ is not set, and has no default valueโ€ or โ€œError: Variables not allowedโ€

This is commonly associated with using TF_VAR_* where the variable type is a list or map. Please make sure the value is properly formatted for the variable type.
list type expects an array with quotes around the list item. e.g. ["listitem1", "listitem2"]
map type expects a key/value map surrounded curly brackets. e.g. {"key1": "value1", "key2": "value2"}

โ€Error: Incorrect attribute value typeโ€

This can occur if your template variables do not specify the type and you are trying to assign the value in the Environment Variables section. e.g.
export TF_VAR_myvar='["listitem1","listitem2"]'
variable "myvar" {
  type = list(string) // make sure you add this field to your variable
}