diff --git a/terraform/modules/dns_records/main.tf b/terraform/modules/dns_records/main.tf index 5b6213e..fc1507e 100644 --- a/terraform/modules/dns_records/main.tf +++ b/terraform/modules/dns_records/main.tf @@ -1,8 +1,8 @@ -resource "cloudflare_dns_record" "record" { +resource "cloudflare_record" "record" { for_each = { for idx, name in var.names : idx => name } zone_id = var.cloudflare_zone_id - content = var.dns + value = var.dns name = each.value type = var.type ttl = 1 diff --git a/terraform/modules/dns_records/providers.tf b/terraform/modules/dns_records/providers.tf index 3ee498f..9369573 100644 --- a/terraform/modules/dns_records/providers.tf +++ b/terraform/modules/dns_records/providers.tf @@ -2,7 +2,7 @@ terraform { required_providers { cloudflare = { source = "cloudflare/cloudflare" - version = "5.0.0-alpha1" + version = "~> 4.0" } } diff --git a/terraform/providers.tf b/terraform/providers.tf index 8be71e1..6af7e25 100644 --- a/terraform/providers.tf +++ b/terraform/providers.tf @@ -10,7 +10,7 @@ terraform { required_providers { cloudflare = { source = "cloudflare/cloudflare" - version = "5.0.0-alpha1" + version = "~> 4.0" } }