diff --git a/README.md b/README.md index fb883f6..5fc2ac0 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Manage Gitea resources, teams, repos, and Woodpecker CI via Terraform. `config/github.com/IUCLabs/` feeds `modules/github_org` via `environments/github/iuclabs`, authenticated as a GitHub App (`kv/service/github/iuclabs/terraform`). Org membership invites are manual. -`config.yaml` (optional) manages org settings: `billing_email`, `default_repository_permission` (read), `members_can_create_repositories` (false), `public_runners` (false; lets public repos use the Default runner group). Every org also gets a read-only, non-approving `GITHUB_TOKEN`. +`config.yaml` (optional) manages org settings: `billing_email`, profile (`name`, `description`, `blog`, `location`, `email`, `twitter_username`, `company`), `default_repository_permission` (read), `members_can_create_repositories` (false), `public_runners` (false; lets public repos use the Default runner group). Every other org setting is pinned in the module (no Pages, no repo projects, legacy security toggles off), and `GITHUB_TOKEN` is read-only and non-approving. Without it, none of this is managed. `team/.yaml`: diff --git a/config/config.hcl b/config/config.hcl index 1b32031..5adeb1e 100644 --- a/config/config.hcl +++ b/config/config.hcl @@ -86,6 +86,7 @@ locals { if content.kind == kind } }, { - settings = { for file_path, content in local.github_configs : content.organisation => content if content.kind == "config.yaml" } + # raw yaml: github_configs overwrites name with the file basename + settings = { for file_path, content in local.github_configs : content.organisation => local.all_configs[file_path] if content.kind == "config.yaml" } }) } diff --git a/config/github.com/IUCLabs/config.yaml b/config/github.com/IUCLabs/config.yaml index 7dc4b53..b93a09c 100644 --- a/config/github.com/IUCLabs/config.yaml +++ b/config/github.com/IUCLabs/config.yaml @@ -1,3 +1,5 @@ +name: IUCLabs +description: Institute of Unnecessary Complexity Labs billing_email: neotheo@gmail.com default_repository_permission: read members_can_create_repositories: false diff --git a/environments/github/iuclabs/terragrunt.hcl b/environments/github/iuclabs/terragrunt.hcl index 5255a04..623635c 100644 --- a/environments/github/iuclabs/terragrunt.hcl +++ b/environments/github/iuclabs/terragrunt.hcl @@ -31,6 +31,7 @@ EOF generate "imports" { path = "imports.tf" if_exists = "overwrite" + disable = lookup(local.github.settings, local.owner, null) == null contents = <