Skip to content

Commit

Permalink
add jellyfin endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Rasmus Wejlgaard committed Jan 5, 2024
1 parent b7c92e4 commit 1fb2005
Showing 1 changed file with 78 additions and 66 deletions.
144 changes: 78 additions & 66 deletions cloudflare_tunnels.tf
Original file line number Diff line number Diff line change
@@ -1,89 +1,89 @@
resource "cloudflare_tunnel" "london-a" {
account_id = cloudflare_account.this.id
name = "London A"
secret = ""
account_id = cloudflare_account.this.id
name = "London A"
secret = ""
}

resource "cloudflare_tunnel" "london-b" {
account_id = cloudflare_account.this.id
name = "London B"
secret = ""
account_id = cloudflare_account.this.id
name = "London B"
secret = ""
}

resource "cloudflare_tunnel" "copenhagen-a" {
account_id = cloudflare_account.this.id
name = "Copenhagen A"
secret = ""
account_id = cloudflare_account.this.id
name = "Copenhagen A"
secret = ""
}

resource "cloudflare_tunnel" "copenhagen-b" {
account_id = cloudflare_account.this.id
name = "Copenhagen B"
secret = ""
account_id = cloudflare_account.this.id
name = "Copenhagen B"
secret = ""
}

resource "cloudflare_tunnel" "copenhagen-c" {
account_id = cloudflare_account.this.id
name = "Copenhagen C"
secret = ""
account_id = cloudflare_account.this.id
name = "Copenhagen C"
secret = ""
}

resource "cloudflare_tunnel_config" "london-a" {
account_id = cloudflare_account.this.id
tunnel_id = cloudflare_tunnel.london-a.id
tunnel_id = cloudflare_tunnel.london-a.id
config {
ingress_rule {
hostname = "grafana.pez.sh"
service = "http://localhost:3000"
service = "http://localhost:3000"
origin_request {
access {
aud_tag = [ cloudflare_access_application.grafana.aud ]
required = true
aud_tag = [cloudflare_access_application.grafana.aud]
required = true
team_name = "pezsh"
}
}
}
ingress_rule {
hostname = "portainer.pez.sh"
service = "https://localhost:9443"
service = "https://localhost:9443"
origin_request {
access {
aud_tag = [ cloudflare_access_application.portainer.aud ]
required = true
team_name = "pezsh"
aud_tag = [cloudflare_access_application.portainer.aud]
required = true
team_name = "pezsh"
}
no_tls_verify = true
}
}
ingress_rule {
hostname = "prometheus.pez.sh"
service = "http://localhost:9090"
service = "http://localhost:9090"
origin_request {
access {
aud_tag = [ cloudflare_access_application.prometheus.aud ]
required = true
team_name = "pezsh"
aud_tag = [cloudflare_access_application.prometheus.aud]
required = true
team_name = "pezsh"
}
}
}
ingress_rule {
hostname = "alertmanager.pez.sh"
service = "http://localhost:9093"
service = "http://localhost:9093"
origin_request {
access {
aud_tag = [ cloudflare_access_application.alertmanager.aud ]
required = true
team_name = "pezsh"
aud_tag = [cloudflare_access_application.alertmanager.aud]
required = true
team_name = "pezsh"
}
}
}
ingress_rule {
hostname = "minecraft-map.pez.sh"
service = "http://localhost:8124"
service = "http://localhost:8124"
}
ingress_rule {
hostname = "minecraft.pez.sh"
service = "tcp://localhost:25565"
service = "tcp://localhost:25565"
}
ingress_rule {
service = "http_status:404"
Expand All @@ -93,93 +93,97 @@ resource "cloudflare_tunnel_config" "london-a" {

resource "cloudflare_tunnel_config" "london-b" {
account_id = cloudflare_account.this.id
tunnel_id = cloudflare_tunnel.london-b.id
tunnel_id = cloudflare_tunnel.london-b.id
config {
ingress_rule {
hostname = "radarr.pez.sh"
service = "http://192.168.1.253:7878"
service = "http://192.168.1.253:7878"
origin_request {
access {
aud_tag = [ cloudflare_access_application.radarr.aud ]
required = true
aud_tag = [cloudflare_access_application.radarr.aud]
required = true
team_name = "pezsh"
}
http_host_header = "localhost:7878"
}
}
ingress_rule {
hostname = "download.pez.sh"
service = "http://localhost:9091"
service = "http://localhost:9091"
origin_request {
access {
aud_tag = [ cloudflare_access_application.transmission.aud ]
required = true
team_name = "pezsh"
aud_tag = [cloudflare_access_application.transmission.aud]
required = true
team_name = "pezsh"
}
http_host_header = "localhost:9091"
}
}
ingress_rule {
hostname = "sonarr.pez.sh"
service = "http://localhost:8989"
service = "http://localhost:8989"
origin_request {
access {
aud_tag = [ cloudflare_access_application.sonarr.aud ]
required = true
team_name = "pezsh"
aud_tag = [cloudflare_access_application.sonarr.aud]
required = true
team_name = "pezsh"
}
http_host_header = "localhost:8989"
}
}
ingress_rule {
hostname = "prowlarr.pez.sh"
service = "http://localhost:9696"
service = "http://localhost:9696"
origin_request {
access {
aud_tag = [ cloudflare_access_application.prowlarr.aud ]
required = true
team_name = "pezsh"
aud_tag = [cloudflare_access_application.prowlarr.aud]
required = true
team_name = "pezsh"
}
http_host_header = "prowlarr.pez.sh"
}
}
ingress_rule {
hostname = "plex.pez.sh"
service = "http://localhost:32400"
service = "http://localhost:32400"
origin_request {
access {
aud_tag = [ cloudflare_access_application.plex.aud ]
required = true
team_name = "pezsh"
aud_tag = [cloudflare_access_application.plex.aud]
required = true
team_name = "pezsh"
}
http_host_header = "plex.pez.sh"
}
}
ingress_rule {
hostname = "overseer.pez.sh"
service = "http://localhost:5055"
service = "http://localhost:5055"
origin_request {
access {
aud_tag = [ cloudflare_access_application.request.aud ]
required = true
team_name = "pezsh"
aud_tag = [cloudflare_access_application.request.aud]
required = true
team_name = "pezsh"
}
}
}
ingress_rule {
hostname = "lidarr.pez.sh"
service = "http://localhost:8686"
service = "http://localhost:8686"
origin_request {
access {
aud_tag = [ cloudflare_access_application.lidarr.aud ]
required = true
team_name = "pezsh"
aud_tag = [cloudflare_access_application.lidarr.aud]
required = true
team_name = "pezsh"
}
}
}
ingress_rule {
hostname = "request.pez.sh"
service = "http://localhost:5055"
service = "http://localhost:5055"
}
ingress_rule {
hostname = "jellyfin.pez.sh"
service = "http://localhost:8096"
}
ingress_rule {
service = "http_status:404"
Expand All @@ -189,7 +193,7 @@ resource "cloudflare_tunnel_config" "london-b" {

resource "cloudflare_tunnel_config" "copenhagen-a" {
account_id = cloudflare_account.this.id
tunnel_id = cloudflare_tunnel.copenhagen-a.id
tunnel_id = cloudflare_tunnel.copenhagen-a.id
config {
ingress_rule {
service = "http_status:404"
Expand All @@ -199,8 +203,16 @@ resource "cloudflare_tunnel_config" "copenhagen-a" {

resource "cloudflare_tunnel_config" "copenhagen-b" {
account_id = cloudflare_account.this.id
tunnel_id = cloudflare_tunnel.copenhagen-b.id
tunnel_id = cloudflare_tunnel.copenhagen-b.id
config {
ingress_rule {
hostname = "cloud.pez.sh"
service = "http://localhost:11000"
origin_request {
no_tls_verify = true
origin_server_name = "cloud.pez.sh"
}
}
ingress_rule {
service = "http_status:404"
}
Expand All @@ -209,10 +221,10 @@ resource "cloudflare_tunnel_config" "copenhagen-b" {

resource "cloudflare_tunnel_config" "copenhagen-c" {
account_id = cloudflare_account.this.id
tunnel_id = cloudflare_tunnel.copenhagen-c.id
tunnel_id = cloudflare_tunnel.copenhagen-c.id
config {
ingress_rule {
service = "http_status:404"
}
}
}
}

0 comments on commit 1fb2005

Please sign in to comment.