Skip to content

Commit

Permalink
Disable GitHub policy when device policy is used
Browse files Browse the repository at this point in the history
  • Loading branch information
m4xmorris committed Nov 27, 2023
1 parent 59740e3 commit 45dbd08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ resource "cloudflare_access_policy" "github_policy" {
teams = var.github_teams
}
}
count = length(var.device_policy_rules) == 0 ? 1 : 0
}

resource "cloudflare_access_policy" "email_policy" {
Expand All @@ -45,7 +46,7 @@ resource "cloudflare_access_policy" "device_policy" {
application_id = cloudflare_access_application.application.id
zone_id = var.cloudflare_zone_id
name = "${var.name} Device Policy"
precedence = "10"
precedence = "1"
decision = "allow"
purpose_justification_required = var.purpose_justification_required
purpose_justification_prompt = var.purpose_justification_required ? var.purpose_justification_prompt : null
Expand Down

0 comments on commit 45dbd08

Please sign in to comment.