harden IUCLabs org settings, actions token and runner access
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful

This commit is contained in:
2026-11-10 22:16:51 +11:00
parent 23c315a49a
commit b002fa2917
7 changed files with 132 additions and 2 deletions
@@ -28,9 +28,26 @@ provider "github" {
EOF
}
generate "imports" {
path = "imports.tf"
if_exists = "overwrite"
contents = <<EOF
import {
to = github_organization_settings.this[0]
id = "${local.owner}"
}
import {
to = github_actions_runner_group.default[0]
id = "1"
}
EOF
}
inputs = {
owner = local.owner
team = { for k, v in local.github.team : v.name => v if v.organisation == local.owner }
ruleset = { for k, v in local.github.ruleset : v.name => v if v.organisation == local.owner }
repository = { for k, v in local.github.repository : v.name => v if v.organisation == local.owner }
settings = lookup(local.github.settings, local.owner, null)
}