diff options
author | clarkzjw <[email protected]> | 2023-01-13 21:49:44 -0800 |
---|---|---|
committer | clarkzjw <[email protected]> | 2023-01-13 21:49:44 -0800 |
commit | 4f274f77122479d16d74ade9a0867da71cdf3cee (patch) | |
tree | 5cd696e4404242724766499eddf95ee0f9eeefc1 /clarkzjw.cc/infra/tunnel.tf | |
parent | cecb49a197e11a87e8964da965e52a25eba96414 (diff) | |
download | homelab-4f274f77122479d16d74ade9a0867da71cdf3cee.tar.gz |
cloudflare: reorder
Diffstat (limited to 'clarkzjw.cc/infra/tunnel.tf')
-rw-r--r-- | clarkzjw.cc/infra/tunnel.tf | 22 |
1 files changed, 22 insertions, 0 deletions
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 @@ | |||
1 | # Argo tunnel | ||
2 | resource "cloudflare_argo_tunnel" "atlas_main_tunnel" { | ||
3 | account_id = var.cloudflare_account_id | ||
4 | name = "${var.homelab_main_domain}-tunnel" | ||
5 | secret = random_id.atlas_tunnel_secret.b64_std | ||
6 | } | ||
7 | |||
8 | resource "cloudflare_tunnel_config" "atlas_tunnel_route" { | ||
9 | account_id = var.cloudflare_account_id | ||
10 | tunnel_id = cloudflare_argo_tunnel.atlas_main_tunnel.id | ||
11 | |||
12 | config { | ||
13 | ingress_rule { | ||
14 | hostname = "bt.${var.homelab_main_domain}" | ||
15 | path = "/" | ||
16 | service = "http://127.0.0.1:8080" | ||
17 | } | ||
18 | ingress_rule { | ||
19 | service = "http_status:404" | ||
20 | } | ||
21 | } | ||
22 | } | ||