【发布时间】:2018-09-16 02:46:19
【问题描述】:
这是我的 variables.tf 文件
variable vpc-count { description = "Number of VPC to create" }
variable "vpc1" { description = "Enter the CIDR for vpc1" }
variable "vpc2" { description = "Enter the CIDR for vpc2" }
variable subnet-count { description ="Enter the number of subnets for vpc" }
variable "sub1vpc1" { description = "Enter the CIDR for subnet1 of vpc1" }
variable "sub2vpc1" { description = "Enter the CIDR for subnet2 of vpc1" }
variable "sub1vpc2" { description = "Enter the CIDR for subnet2 of vpc1" }
variable "sub2vpc2" { description = "Enter the CIDR for subnet2 of vpc2" }
未指定值的原因是因为需要交互并为用户提供选项以输入 vpc cidr 、子网 cidr 等的相关值。
但是在进入“terraform plan”时。它提示 Enter value: question 但不是按照 variables.tf 文件中提到的顺序
例如:问的第一个问题来自
variable "sub1vpc1" { description = "Enter the CIDR for subnet1 of vpc1" }
虽然排在第五位
Terraform 不会对 .我认为甚至在 VPC cidr 之前就询问有关子网 cidr 的问题不是正确的方式
任何补救措施
【问题讨论】:
标签: terraform