【发布时间】:2022-01-12 19:45:09
【问题描述】:
以下是我们的云中使用的 terraform 模块的变量声明,这些变量的输入是通过其中一种自动化解决方案获得的。现在,我想重现一个问题,我想从下面的变量定义中创建一个 tfvars 文件。
variables.tf:
variable "docker" {
type = object({
image_name = string
image_location = string
docker_ports = object({
internal = number
external = number
})
rmodelling = object({
lang = object({
version = number
enabled = bool
policy = object({
identification = string
})
})
impl = object({
version = number
enabled = bool
policy = object({
identification = string
})
})
})
})
}
我已经尝试过这样的事情,但是对于下一个嵌套的反对,我不太确定如何放下这些。有人可以指导或提供一些指示吗?
terraform.tfvars:
docker = {
image_name = "Ubuntu 18.04"
image_location = "https://registry.jd.com/ubuntu/<custom_location>"
docker_ports = {
internal = 80
external = 443
}
rmodelling = { ??
???
【问题讨论】:
标签: azure terraform terraform-provider-azure