📜  terraform 条件资源 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:54.679000             🧑  作者: Mango

代码示例1
resource "cloudflare_record" "record" {
  count = var.cloudflare ? 1 : 0
  zone_id = "${data.cloudflare_zones.domain.zones[0].id}"
  name    = "${var.subdomain}"
  value   = "${var.origin_server}"
  type    = "CNAME"
  ttl     = 1
  proxied = true
}