From 3e12c8a90c5eabe3ca154dcb8d586895b1a49e36 Mon Sep 17 00:00:00 2001 From: Alexander Hosking Date: Sat, 26 Mar 2022 22:59:02 -0400 Subject: [PATCH] Add CF access policy to Money --- ahoskingit/terraform/cloudflare_access.tf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ahoskingit/terraform/cloudflare_access.tf b/ahoskingit/terraform/cloudflare_access.tf index f1ae019..997d372 100644 --- a/ahoskingit/terraform/cloudflare_access.tf +++ b/ahoskingit/terraform/cloudflare_access.tf @@ -22,6 +22,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 = ["@ahosking.com"] + } + require { + email = ["@ahosking.com"] + } +} + resource "cloudflare_access_application" "movies" { account_id = var.CLOUDFLARE_ACCOUNT_ID name = "movies"