diff --git a/external/modules/cloudflare/main.tf b/external/modules/cloudflare/main.tf index 21e5b819..62467168 100644 --- a/external/modules/cloudflare/main.tf +++ b/external/modules/cloudflare/main.tf @@ -9,7 +9,7 @@ resource "random_password" "tunnel_secret" { special = false } -resource "cloudflare_argo_tunnel" "homelab" { +resource "cloudflare_tunnel" "homelab" { account_id = var.cloudflare_account_id name = "homelab" secret = base64encode(random_password.tunnel_secret.result) @@ -20,7 +20,7 @@ resource "cloudflare_record" "tunnel" { zone_id = data.cloudflare_zone.zone.id type = "CNAME" name = "homelab-tunnel" - value = "${cloudflare_argo_tunnel.homelab.id}.cfargotunnel.com" + value = "${cloudflare_tunnel.homelab.id}.cfargotunnel.com" proxied = false ttl = 1 # Auto } @@ -38,8 +38,8 @@ resource "kubernetes_secret" "cloudflared_credentials" { data = { "credentials.json" = jsonencode({ AccountTag = var.cloudflare_account_id - TunnelName = cloudflare_argo_tunnel.homelab.name - TunnelID = cloudflare_argo_tunnel.homelab.id + TunnelName = cloudflare_tunnel.homelab.name + TunnelID = cloudflare_tunnel.homelab.id TunnelSecret = base64encode(random_password.tunnel_secret.result) }) } diff --git a/external/modules/cloudflare/versions.tf b/external/modules/cloudflare/versions.tf index 6404c03c..00188051 100644 --- a/external/modules/cloudflare/versions.tf +++ b/external/modules/cloudflare/versions.tf @@ -2,7 +2,7 @@ terraform { required_providers { cloudflare = { source = "cloudflare/cloudflare" - version = "~> 3.35.0" + version = "~> 4.30.0" } kubernetes = { diff --git a/external/versions.tf b/external/versions.tf index af9c535b..b441bdf9 100644 --- a/external/versions.tf +++ b/external/versions.tf @@ -13,7 +13,7 @@ terraform { required_providers { cloudflare = { source = "cloudflare/cloudflare" - version = "~> 3.35.0" + version = "~> 4.30.0" } kubernetes = {