Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/ruleset/organization_ruleset.tf
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ resource "github_organization_ruleset" "ruleset" {
for_each = var.bypass_actors.organization_admin != null ? [1] : []

content {
# Docs suggest the ID can be fixed to 1 - https://registry.terraform.io/providers/integrations/github/latest/docs/resources/organization_ruleset#OrganizationAdmin-2
actor_id = 1
# Although provider docs suggest the ID can be fixed to 1, it has been recently changed to 0 - https://github.com/integrations/terraform-provider-github/issues/2536
actor_id = 0
actor_type = "OrganizationAdmin"
bypass_mode = coalesce(var.bypass_actors.organization_admin.always_bypass, false) ? "always" : "pull_request"
}
Expand Down
2 changes: 1 addition & 1 deletion modules/ruleset/organization_ruleset.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ run "bypass_actor_integrations_test" {
# Test the Organization Admin bypass actors
run "bypass_actor_organization_admin_test" {
assert {
condition = github_organization_ruleset.ruleset[0].bypass_actors[3].actor_id == 1
condition = github_organization_ruleset.ruleset[0].bypass_actors[3].actor_id == 0
error_message = "The bypass actor organization admin id is incorrect."
}
assert {
Expand Down
4 changes: 2 additions & 2 deletions modules/ruleset/repository_ruleset.tf
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ resource "github_repository_ruleset" "ruleset" {
for_each = var.bypass_actors.organization_admin != null ? [1] : []

content {
# Docs suggest the ID can be fixed to 1 - https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_ruleset#OrganizationAdmin-1
actor_id = 1
# Although provider docs suggest the ID can be fixed to 1, it has been recently changed to 0 - https://github.com/integrations/terraform-provider-github/issues/2536
actor_id = 0
actor_type = "OrganizationAdmin"
bypass_mode = coalesce(var.bypass_actors.organization_admin.always_bypass, false) ? "always" : "pull_request"
}
Expand Down
2 changes: 1 addition & 1 deletion modules/ruleset/repository_ruleset.tftest.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ run "bypass_actor_integrations_test" {
# Test the Organization Admin bypass actors
run "bypass_actor_organization_admin_test" {
assert {
condition = github_repository_ruleset.ruleset[0].bypass_actors[3].actor_id == 1
condition = github_repository_ruleset.ruleset[0].bypass_actors[3].actor_id == 0
error_message = "The bypass actor organization admin id is incorrect."
}
assert {
Expand Down