Skip to content

Commit

Permalink
add lidarr to access
Browse files Browse the repository at this point in the history
  • Loading branch information
RWejlgaard committed Dec 19, 2023
1 parent e8242fe commit b7c92e4
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cloudflare_access.tf
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,18 @@ resource "cloudflare_access_application" "sonarr" {
logo_url = "https://res.cloudinary.com/razordarkamg/image/upload/v1621212884/SonarrV3_pufacd.png"
}

resource "cloudflare_access_application" "lidarr" {
zone_id = cloudflare_zone.pez-sh.id
name = "Lidarr - Music"
domain = "lidarr.pez.sh"
type = "self_hosted"
session_duration = "730h"
allowed_idps = [ cloudflare_access_identity_provider.azure_ad.id ]
auto_redirect_to_identity = false
app_launcher_visible = true
http_only_cookie_attribute = true
}

resource "cloudflare_access_application" "app-launcher" {
name = "App Launcher"
type = "app_launcher"
Expand Down
8 changes: 8 additions & 0 deletions cloudflare_dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ resource "cloudflare_record" "sonarr" {
proxied = true
}

resource "cloudflare_record" "lidarr" {
zone_id = cloudflare_zone.pez-sh.id
name = "lidarr"
type = "CNAME"
value = "${cloudflare_tunnel.london-b.id}.cfargotunnel.com"
proxied = true
}

resource "cloudflare_record" "www" {
zone_id = cloudflare_zone.pez-sh.id
name = "www"
Expand Down
11 changes: 11 additions & 0 deletions cloudflare_tunnels.tf
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,17 @@ resource "cloudflare_tunnel_config" "london-b" {
}
}
}
ingress_rule {
hostname = "lidarr.pez.sh"
service = "http://localhost:8686"
origin_request {
access {
aud_tag = [ cloudflare_access_application.lidarr.aud ]
required = true
team_name = "pezsh"
}
}
}
ingress_rule {
hostname = "request.pez.sh"
service = "http://localhost:5055"
Expand Down

0 comments on commit b7c92e4

Please sign in to comment.