-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcloudflare_network_admin_services.tf
224 lines (191 loc) · 7.13 KB
/
cloudflare_network_admin_services.tf
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# 整地鯖管理者が、デバッグ目的や監査目的で各種サービスに接続する必要がある際に経由するネットワーク。
resource "cloudflare_certificate_pack" "advanced_cert_for_admin_network" {
zone_id = local.cloudflare_zone_id
type = "advanced"
hosts = [
local.root_domain,
"*.onp-k8s.admin.${local.root_domain}",
"*.onp.admin.${local.root_domain}",
"*.debug.admin.${local.root_domain}",
]
validation_method = "txt"
validity_days = 365
certificate_authority = "digicert"
cloudflare_branding = false
}
resource "cloudflare_access_application" "debug_admin_jmx" {
zone_id = local.cloudflare_zone_id
name = "Debug server administration"
domain = "jmx.debug.admin.${local.root_domain}"
type = "self_hosted"
session_duration = "24h"
http_only_cookie_attribute = true
}
resource "cloudflare_access_policy" "debug_admin_jmx" {
application_id = cloudflare_access_application.debug_admin_jmx.id
zone_id = local.cloudflare_zone_id
name = "Require to be in a GitHub team to access"
precedence = "1"
decision = "allow"
include {
github {
name = local.github_org_name
teams = [github_team.debug_admin_jmx.slug]
identity_provider_id = cloudflare_access_identity_provider.github_oauth.id
}
}
}
resource "cloudflare_access_application" "onp_admin_proxmox" {
zone_id = local.cloudflare_zone_id
name = "Proxmox administration"
domain = "proxmox.onp.admin.${local.root_domain}"
type = "self_hosted"
session_duration = "24h"
http_only_cookie_attribute = true
}
resource "cloudflare_access_policy" "onp_admin_proxmox" {
application_id = cloudflare_access_application.onp_admin_proxmox.id
zone_id = local.cloudflare_zone_id
name = "Require to be in a GitHub team to access"
precedence = "1"
decision = "allow"
include {
github {
name = local.github_org_name
teams = [github_team.onp_admin_proxmox.slug]
identity_provider_id = cloudflare_access_identity_provider.github_oauth.id
}
}
}
resource "cloudflare_access_application" "onp_admin_proxmox_mon" {
zone_id = local.cloudflare_zone_id
name = "Proxmox-mon administration"
domain = "proxmox-mon.onp.admin.${local.root_domain}"
type = "self_hosted"
session_duration = "24h"
http_only_cookie_attribute = true
}
resource "cloudflare_access_policy" "onp_admin_proxmox_mon" {
application_id = cloudflare_access_application.onp_admin_proxmox_mon.id
zone_id = local.cloudflare_zone_id
name = "Require to be in a GitHub team to access"
precedence = "1"
decision = "allow"
include {
github {
name = local.github_org_name
teams = [github_team.onp_admin_proxmox_mon.slug]
identity_provider_id = cloudflare_access_identity_provider.github_oauth.id
}
}
}
resource "cloudflare_access_application" "onp_admin_zabbix" {
zone_id = local.cloudflare_zone_id
name = "Zabbix administration"
domain = "zabbix.onp.admin.${local.root_domain}"
type = "self_hosted"
session_duration = "24h"
http_only_cookie_attribute = true
}
resource "cloudflare_access_policy" "onp_admin_zabbix" {
application_id = cloudflare_access_application.onp_admin_zabbix.id
zone_id = local.cloudflare_zone_id
name = "Require to be in a GitHub team to access"
precedence = "1"
decision = "allow"
include {
github {
name = local.github_org_name
teams = [github_team.onp_admin_zabbix.slug]
identity_provider_id = cloudflare_access_identity_provider.github_oauth.id
}
}
}
resource "cloudflare_access_application" "onp_admin_raritan" {
zone_id = local.cloudflare_zone_id
name = "raritan(PDU) administration"
domain = "raritan.onp.admin.${local.root_domain}"
type = "self_hosted"
session_duration = "24h"
http_only_cookie_attribute = true
}
resource "cloudflare_access_policy" "onp_admin_raritan" {
application_id = cloudflare_access_application.onp_admin_raritan.id
zone_id = local.cloudflare_zone_id
name = "Require to be in a GitHub team to access"
precedence = "1"
decision = "allow"
include {
github {
name = local.github_org_name
teams = [github_team.onp_admin_raritan.slug]
identity_provider_id = cloudflare_access_identity_provider.github_oauth.id
}
}
}
resource "cloudflare_access_application" "onp_admin_minio" {
zone_id = local.cloudflare_zone_id
name = "minio-console administration"
domain = "minio-console.onp-k8s.admin.${local.root_domain}"
type = "self_hosted"
session_duration = "24h"
http_only_cookie_attribute = true
}
resource "cloudflare_access_policy" "onp_admin_minio" {
application_id = cloudflare_access_application.onp_admin_minio.id
zone_id = local.cloudflare_zone_id
name = "Require to be in a GitHub team to access"
precedence = "1"
decision = "allow"
include {
github {
name = local.github_org_name
teams = [github_team.onp_admin_minio.slug]
identity_provider_id = cloudflare_access_identity_provider.github_oauth.id
}
}
}
resource "cloudflare_access_application" "onp_hubble_ui" {
zone_id = local.cloudflare_zone_id
name = "Cilium Hubble UI"
domain = "hubble-ui.onp-k8s.admin.${local.root_domain}"
type = "self_hosted"
session_duration = "24h"
http_only_cookie_attribute = true
}
resource "cloudflare_access_policy" "onp_hubble_ui" {
application_id = cloudflare_access_application.onp_hubble_ui.id
zone_id = local.cloudflare_zone_id
name = "Require to be in a GitHub team to access"
precedence = "1"
decision = "allow"
include {
github {
name = local.github_org_name
teams = [github_team.onp_hubble_ui.slug]
identity_provider_id = cloudflare_access_identity_provider.github_oauth.id
}
}
}
resource "cloudflare_access_application" "onp_phpmyadmin" {
zone_id = local.cloudflare_zone_id
name = "phpMyAdmin"
domain = "phpmyadmin.onp-k8s.admin.${local.root_domain}"
type = "self_hosted"
session_duration = "24h"
http_only_cookie_attribute = true
}
resource "cloudflare_access_policy" "onp_phpmyadmin" {
application_id = cloudflare_access_application.onp_phpmyadmin.id
zone_id = local.cloudflare_zone_id
name = "Require to be in a GitHub team to access"
precedence = "1"
decision = "allow"
include {
github {
name = local.github_org_name
teams = [github_team.onp_phpmyadmin.slug]
identity_provider_id = cloudflare_access_identity_provider.github_oauth.id
}
}
}