2022-03-27 03:08:11 +00:00
|
|
|
resource "cloudflare_access_group" "family" {
|
|
|
|
account_id = var.CLOUDFLARE_ACCOUNT_ID
|
2022-08-16 05:41:51 +00:00
|
|
|
name = "family group"
|
2022-03-27 03:08:11 +00:00
|
|
|
|
|
|
|
include {
|
|
|
|
email_domain = ["@ahosking.com"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-27 02:36:15 +00:00
|
|
|
resource "cloudflare_access_application" "influx" {
|
|
|
|
account_id = var.CLOUDFLARE_ACCOUNT_ID
|
|
|
|
name = "influx"
|
|
|
|
domain = "influx.ahoskingit.com"
|
|
|
|
type = "self_hosted"
|
|
|
|
session_duration = "168h"
|
2022-08-16 05:41:51 +00:00
|
|
|
logo_url = "https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fthumb%2Fc%2Fc6%2FInfluxdb_logo.svg%2F1920px-Influxdb_logo.svg"
|
2022-03-27 02:36:15 +00:00
|
|
|
allowed_idps = [
|
|
|
|
"f27ba272-b676-4ab0-b560-e4ea52b19f18", #TODO: Remove Manual Entry
|
|
|
|
"ba68cb89-c20b-49ab-8aea-26b3af318196", #TODO: Remove Manual Entry
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2022-03-26 18:43:59 +00:00
|
|
|
resource "cloudflare_access_application" "money" {
|
2022-03-26 18:51:16 +00:00
|
|
|
account_id = var.CLOUDFLARE_ACCOUNT_ID
|
|
|
|
name = "money"
|
|
|
|
domain = "money.ahosking.com"
|
|
|
|
type = "self_hosted"
|
2022-03-27 02:36:15 +00:00
|
|
|
session_duration = "336h"
|
|
|
|
allowed_idps = [
|
|
|
|
"f27ba272-b676-4ab0-b560-e4ea52b19f18", #TODO: Remove Manual Entry
|
|
|
|
]
|
2022-08-16 05:45:02 +00:00
|
|
|
http_only_cookie_attribute = true
|
2022-03-26 18:43:59 +00:00
|
|
|
}
|
2022-03-27 02:36:15 +00:00
|
|
|
|
2022-03-27 02:59:02 +00:00
|
|
|
resource "cloudflare_access_policy" "money" {
|
|
|
|
application_id = cloudflare_access_application.money.id
|
2022-08-16 05:41:51 +00:00
|
|
|
zone_id = cloudflare_zone.ahosking_com.id
|
|
|
|
name = "family"
|
2022-08-16 05:49:03 +00:00
|
|
|
precedence = "2"
|
2022-08-16 05:41:51 +00:00
|
|
|
decision = "allow"
|
|
|
|
|
2022-03-27 02:59:02 +00:00
|
|
|
include {
|
2022-03-27 03:08:11 +00:00
|
|
|
email_domain = ["@ahosking.com"]
|
2022-03-27 02:59:02 +00:00
|
|
|
}
|
|
|
|
require {
|
2022-03-27 03:08:11 +00:00
|
|
|
email_domain = ["@ahosking.com"]
|
2022-03-27 02:59:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-03-27 02:36:15 +00:00
|
|
|
resource "cloudflare_access_application" "movies" {
|
|
|
|
account_id = var.CLOUDFLARE_ACCOUNT_ID
|
|
|
|
name = "movies"
|
|
|
|
domain = "movies.ahosking.com"
|
|
|
|
type = "self_hosted"
|
|
|
|
session_duration = "336h"
|
|
|
|
allowed_idps = [
|
|
|
|
"f27ba272-b676-4ab0-b560-e4ea52b19f18", #TODO: Remove Manual Entry
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
resource "cloudflare_access_application" "tv" {
|
|
|
|
account_id = var.CLOUDFLARE_ACCOUNT_ID
|
|
|
|
name = "tv"
|
|
|
|
domain = "tv.ahosking.com"
|
|
|
|
type = "self_hosted"
|
|
|
|
session_duration = "336h"
|
|
|
|
allowed_idps = [
|
|
|
|
"f27ba272-b676-4ab0-b560-e4ea52b19f18", #TODO: Remove Manual Entry
|
|
|
|
]
|
2022-04-23 18:13:02 +00:00
|
|
|
}
|
|
|
|
|
2022-08-16 05:41:51 +00:00
|
|
|
resource "cloudflare_access_application" "cycles" {
|
2022-04-23 18:13:02 +00:00
|
|
|
account_id = var.CLOUDFLARE_ACCOUNT_ID
|
2022-08-16 05:41:51 +00:00
|
|
|
name = "cycles"
|
|
|
|
domain = "cycles.ahosking.com"
|
2022-04-23 18:13:02 +00:00
|
|
|
type = "self_hosted"
|
|
|
|
session_duration = "336h"
|
|
|
|
allowed_idps = [
|
|
|
|
"f27ba272-b676-4ab0-b560-e4ea52b19f18", #TODO: Remove Manual Entry
|
|
|
|
]
|
2022-08-16 05:41:51 +00:00
|
|
|
|
|
|
|
http_only_cookie_attribute = true
|
2022-04-23 18:13:02 +00:00
|
|
|
}
|
|
|
|
|
2022-08-16 05:41:51 +00:00
|
|
|
resource "cloudflare_access_policy" "cycles" {
|
|
|
|
application_id = cloudflare_access_application.cycles.id
|
|
|
|
zone_id = cloudflare_zone.ahosking_com.id
|
|
|
|
name = "family"
|
|
|
|
precedence = "1"
|
|
|
|
decision = "allow"
|
2022-04-23 18:13:02 +00:00
|
|
|
include {
|
|
|
|
email_domain = ["@ahosking.com"]
|
|
|
|
}
|
|
|
|
require {
|
|
|
|
email_domain = ["@ahosking.com"]
|
|
|
|
}
|
|
|
|
}
|