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
9 changes: 4 additions & 5 deletions .tf/ruleset.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Import only once the ruleset exists and var.ruleset_id names it; an import block pointing at a
# ruleset that has never been created fails the plan.
# A ruleset can be imported by its numeric ID and no other way, and state is not kept between
# runs, so the ID is written down here. Recreating the ruleset gives it a new one.
import {
for_each = var.ruleset_id == null ? toset([]) : toset([var.ruleset_id])
id = "setup-mago:${each.value}"
to = github_repository_ruleset.default
id = "setup-mago:20882589"
to = github_repository_ruleset.default
}
resource "github_repository_ruleset" "default" {
name = "default"
Expand Down
8 changes: 0 additions & 8 deletions .tf/variable.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,3 @@ variable "github_actions" {
type = bool
default = false
}

# A ruleset can only be imported by its numeric ID, which does not exist until the ruleset does.
# Leave this unset for the first apply, then set the default to the ID the apply printed so later
# runs import the ruleset instead of planning a second one.
variable "ruleset_id" {
type = string
default = null
}
Loading