This repository has been archived on 2026-11-21. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
terraform-git/environments/github/iuclabs/terragrunt.hcl
T
unkin-agent fac5dc89a6
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
manage IUCLabs org settings with billing email from Vault
2026-11-10 23:09:47 +11:00

55 lines
1.2 KiB
HCL

include "root" {
path = find_in_parent_folders("root.hcl")
expose = true
}
include "config" {
path = "${get_repo_root()}/config/config.hcl"
expose = true
}
locals {
owner = "IUCLabs"
github = include.config.locals.github
}
terraform {
source = "../../../modules/github_org"
}
generate "provider" {
path = "provider.tf"
if_exists = "overwrite"
contents = <<EOF
provider "github" {
owner = "${local.owner}"
app_auth {}
}
EOF
}
generate "imports" {
path = "imports.tf"
if_exists = "overwrite"
disable = lookup(local.github.settings, local.owner, null) == null
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)
}