blob: 267b1f797cf21cbb4302fc74b11b640d92254ff1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Cloudflare Access Policy
# bt
resource "cloudflare_access_application" "bt" {
zone_id = data.cloudflare_zones.homelab_main_domain.zones[0].id
name = "bt.${var.homelab_main_domain}"
domain = "bt.${var.homelab_main_domain}"
type = "self_hosted"
session_duration = "24h"
auto_redirect_to_identity = false
}
resource "cloudflare_access_policy" "bt" {
application_id = cloudflare_access_application.bt.id
zone_id = data.cloudflare_zones.homelab_main_domain.zones[0].id
name = "Allow"
precedence = "1"
decision = "allow"
include {
email = [var.cloudflare_access_application_email]
}
}
# router
resource "cloudflare_access_application" "edgerouterx" {
zone_id = data.cloudflare_zones.homelab_main_domain.zones[0].id
name = "edgerouterx.${var.homelab_main_domain}"
domain = "edgerouterx.${var.homelab_main_domain}"
type = "self_hosted"
session_duration = "24h"
auto_redirect_to_identity = false
}
resource "cloudflare_access_policy" "edgerouterx" {
application_id = cloudflare_access_application.edgerouterx.id
zone_id = data.cloudflare_zones.homelab_main_domain.zones[0].id
name = "Allow"
precedence = "1"
decision = "allow"
include {
email = [var.cloudflare_access_application_email]
}
}
# proxmox
resource "cloudflare_access_application" "proxmox" {
zone_id = data.cloudflare_zones.homelab_main_domain.zones[0].id
name = "proxmox.${var.homelab_main_domain}"
domain = "proxmox.${var.homelab_main_domain}"
type = "self_hosted"
session_duration = "24h"
auto_redirect_to_identity = false
}
resource "cloudflare_access_policy" "proxmox" {
application_id = cloudflare_access_application.proxmox.id
zone_id = data.cloudflare_zones.homelab_main_domain.zones[0].id
name = "Allow"
precedence = "1"
decision = "allow"
include {
email = [var.cloudflare_access_application_email]
}
}
|