From 0c460cad19cda7c9761cd9f2dd87fd99d3348789 Mon Sep 17 00:00:00 2001 From: Alexander Hosking Date: Sat, 23 Apr 2022 14:13:02 -0400 Subject: [PATCH] Add Period site --- ahoskingit/terraform/cloudflare_access.tf | 27 ++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/ahoskingit/terraform/cloudflare_access.tf b/ahoskingit/terraform/cloudflare_access.tf index 1d4261c..cf8146b 100644 --- a/ahoskingit/terraform/cloudflare_access.tf +++ b/ahoskingit/terraform/cloudflare_access.tf @@ -65,4 +65,29 @@ resource "cloudflare_access_application" "tv" { allowed_idps = [ "f27ba272-b676-4ab0-b560-e4ea52b19f18", #TODO: Remove Manual Entry ] -} \ No newline at end of file +} + +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"] + } +}