diff --git a/.tf/ruleset.tf b/.tf/ruleset.tf index 7856144..c1819ba 100644 --- a/.tf/ruleset.tf +++ b/.tf/ruleset.tf @@ -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" diff --git a/.tf/variable.tf b/.tf/variable.tf index 209db31..ab3140b 100644 --- a/.tf/variable.tf +++ b/.tf/variable.tf @@ -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 -}