From 4f274f77122479d16d74ade9a0867da71cdf3cee Mon Sep 17 00:00:00 2001 From: clarkzjw Date: Fri, 13 Jan 2023 21:49:44 -0800 Subject: cloudflare: reorder --- clarkzjw.cc/infra/tunnel.tf | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 clarkzjw.cc/infra/tunnel.tf (limited to 'clarkzjw.cc/infra/tunnel.tf') diff --git a/clarkzjw.cc/infra/tunnel.tf b/clarkzjw.cc/infra/tunnel.tf new file mode 100644 index 0000000..4ec9a7f --- /dev/null +++ b/clarkzjw.cc/infra/tunnel.tf @@ -0,0 +1,22 @@ +# Argo tunnel +resource "cloudflare_argo_tunnel" "atlas_main_tunnel" { + account_id = var.cloudflare_account_id + name = "${var.homelab_main_domain}-tunnel" + secret = random_id.atlas_tunnel_secret.b64_std +} + +resource "cloudflare_tunnel_config" "atlas_tunnel_route" { + account_id = var.cloudflare_account_id + tunnel_id = cloudflare_argo_tunnel.atlas_main_tunnel.id + + config { + ingress_rule { + hostname = "bt.${var.homelab_main_domain}" + path = "/" + service = "http://127.0.0.1:8080" + } + ingress_rule { + service = "http_status:404" + } + } +} -- cgit v1.2.3