IP 地址变量的未知令牌 IDENT 列表错误 [英] unknown token IDENT list error for IP address variable

查看:27
本文介绍了IP 地址变量的未知令牌 IDENT 列表错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的 .tfvars 变量中将变量定义为

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
}

在 build-windows.tf 文件中,我收到错误为 Unknow token ident list?

In build-windows.tf file I get the error as Unknow token ident list?

不确定我在这里做错了什么,我什至不明白为什么 terraform 要我使用列表而不是字符串.当我使用字符串时,我在 terraform plan 中收到一个错误,指出我必须使用列表.

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.

哪儿也不去.

请帮忙

推荐答案

类型参数是一个字符串 - 尝试将 "list" 传入它.

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

variable "address_space" {
  type = "list"
}

这篇关于IP 地址变量的未知令牌 IDENT 列表错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆