diff --git a/main.tf b/main.tf index 840cacf..13d50d7 100644 --- a/main.tf +++ b/main.tf @@ -32,6 +32,6 @@ resource "cloudflare_access_policy" "email_policy" { name = "${var.name} Email Policy" precedence = "2" decision = "allow" - include {email = var.allowed_emails} + include { email = var.allowed_emails } count = length(var.allowed_emails) > 0 && var.enable_managed_policy ? 1 : 0 } \ No newline at end of file diff --git a/variables.tf b/variables.tf index c936ff4..29fdca5 100644 --- a/variables.tf +++ b/variables.tf @@ -66,9 +66,9 @@ variable "cloudflare_zone_id" { } variable "enable_managed_policy" { - type = bool + type = bool description = "Enable/Disable the managed GitHub and email policies (if disabled ensure you create your own policies!)" - default = true + default = true } variable "github_idp" { @@ -89,5 +89,5 @@ variable "github_teams" { variable "allowed_emails" { type = list(string) description = "List of email addresses permitted to login via OTP" - default = [] + default = [] } \ No newline at end of file