是否有办法将Azure映像的URN传递给storage_image_reference
,而不是分别使用Publisher,Offer和SKU?
例如。通过
OpenLogic:CentOS:7.5:latest
代替
storage_image_reference {
publisher = "OpenLogic"
offer = "CentOS"
sku = "7.5"
version = "latest"
}
答案 0 :(得分:1)
假设地形0.11
variable "urn" {
type = "list"
}
urn = split(":", "OpenLogic:CentOS:7.5:latest")
...
storage_image_reference {
publisher = "${urn[0]}"
offer = "${urn[1]}"
sku = "${urn[2]}"
version = "${urn[3]}"
}