Compare commits

...

5 Commits

3 changed files with 58 additions and 2 deletions

View File

@ -1,3 +1,12 @@
resource "cloudflare_access_group" "family" {
account_id = var.CLOUDFLARE_ACCOUNT_ID
name = "family group"
include {
email_domain = ["@ahosking.com"]
}
}
resource "cloudflare_access_application" "influx" {
account_id = var.CLOUDFLARE_ACCOUNT_ID
name = "influx"
@ -22,6 +31,20 @@ resource "cloudflare_access_application" "money" {
]
}
resource "cloudflare_access_policy" "money" {
application_id = cloudflare_access_application.money.id
zone_id = cloudflare_zone.ahosking_com.id
name = "family"
precedence = "1"
decision = "allow"
include {
email_domain = ["@ahosking.com"]
}
require {
email_domain = ["@ahosking.com"]
}
}
resource "cloudflare_access_application" "movies" {
account_id = var.CLOUDFLARE_ACCOUNT_ID
name = "movies"
@ -42,4 +65,29 @@ resource "cloudflare_access_application" "tv" {
allowed_idps = [
"f27ba272-b676-4ab0-b560-e4ea52b19f18", #TODO: Remove Manual Entry
]
}
}
resource "cloudflare_access_application" "period" {
account_id = var.CLOUDFLARE_ACCOUNT_ID
name = "period"
domain = "period.ahosking.com"
type = "self_hosted"
session_duration = "336h"
allowed_idps = [
"f27ba272-b676-4ab0-b560-e4ea52b19f18", #TODO: Remove Manual Entry
]
}
resource "cloudflare_access_policy" "period" {
application_id = cloudflare_access_application.period.id
zone_id = cloudflare_zone.ahosking_com.id
name = "family"
precedence = "1"
decision = "allow"
include {
email_domain = ["@ahosking.com"]
}
require {
email_domain = ["@ahosking.com"]
}
}

View File

@ -4,6 +4,14 @@ resource "cloudflare_zone" "automatedbytes_com" {
zone = "automatedbytes.com"
}
resource "cloudflare_record" "automatedbytes" {
zone_id = cloudflare_zone.automatedbytes_com.id
name = "automatedbytes.com"
type = "A"
ttl = "1"
value = var.home_ip
}
resource "cloudflare_record" "assets_automatedbytes" {
zone_id = cloudflare_zone.automatedbytes_com.id
name = "assets"

View File

@ -37,5 +37,5 @@ variable "environment" {}
variable "ahosking_com_cnames" {
default = ["code", "radarr", "sonarr", "ombi", "git",
"monitors", "tv", "movies", "money"]
"monitors", "tv", "movies", "money", "period"]
}