feat: initial terraform configuration for GitHub org management - #1
Merged
Conversation
Contributor
OpenTofu Plan 📋 |
Contributor
OpenTofu Plan 📋 |
Contributor
OpenTofu Plan |
Contributor
OpenTofu Plan |
xnoto
added a commit
that referenced
this pull request
Dec 28, 2025
* feat: initial terraform configuration for GitHub org management * fix: add pull-requests write permission for plan comments * fix: add no-color to plan output for CI readability * refactor: use shared OpenTofu workflow * fix: add permissions to caller workflow * shared-workflows
xnoto
added a commit
that referenced
this pull request
Sep 4, 2026
## Summary Import the two Dependabot files that [`tfroot-twilio` PR #1](makeitworkcloud/tfroot-twilio#1) seeded through the required pull-request path. This lets their canonical `tfroot-github` resources adopt existing files instead of attempting protected direct creation. The import reports inherited commit metadata and a create-only setting that would otherwise cause a protected-branch file update. The two resource definitions therefore ignore only `commit_message` and `overwrite_on_create`; their centrally managed file content remains enforced. Fixes # N/A — repair the failed central Dependabot adoption path. ## Type of change - [x] Bug fix - [ ] Feature / enhancement - [ ] Documentation - [x] Infrastructure (OpenTofu root or module) - [ ] GitOps desired state (manifests, kustomize, charts, SOPS/KSOPS secrets) - [ ] Container image - [ ] CI / reusable workflow - [ ] Refactor / cleanup - [ ] Breaking change ## Validation - [x] Required pull-request checks pass — OpenTofu test and plan succeeded in [run 33819976668](https://github.com/makeitworkcloud/tfroot-github/actions/runs/33819976668). - [x] Plan is exactly `2 to import, 0 to add, 0 to change, 0 to destroy`. - [x] Generated or centrally distributed files were regenerated by their owning automation, not hand-edited — the files were exact PR seeds and retain `tfroot-github` as their canonical owner. The provider's documented import IDs use `repository:file-path:branch`, with an empty branch for the default branch. No local OpenTofu, SOPS, state, import, plan, or apply operations were run. ## Impact and rollout Producer: `tfroot-github` owns both generated files and their resource state. Consumer: `tfroot-twilio` now contains the exact seeded files on `main` at [`315acbf8`](makeitworkcloud/tfroot-twilio@315acbf). The previous main apply attempted direct creation before the files existed and failed on repository protection. This PR imports only `.github/dependabot.yml` and `.github/workflows/dependabot-notify.yml` into their existing central resources. Its validated plan neither writes a file nor changes repository protection, Actions secrets, Twilio configuration, or any GitOps/runtime system. After a confirmed merge, verify the environment-gated apply succeeds and records the two imports. Rollback is a reviewed revert of these import declarations. Do not manually edit the managed target files. ## Safety and secrets - [x] Contains no plaintext secrets, decrypted SOPS values, state files, kubeconfigs, tokens, or private endpoints. - [x] No local OpenTofu init/plan/apply/destroy/import/state operations were run or claimed — plans come from pull-request checks. - [x] Breaking or irreversible effects are described above with rollback notes. Repository-side secret scanning is unavailable because GitHub Advanced Security is not enabled; the diff was manually inspected before publication. AI agent materially produced this change; reviewers should confirm the documented import IDs, exact resource addresses, metadata-only lifecycle exclusions, and retained central ownership.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OpenTofu configuration to manage GitHub organization resources as code.
What's Included
gh-repositories.tfgh-protections.tfgh-secrets.tfgh-iam.tfCI/CD
ghcr.io/makeitworkcloud/runner:latestcontainerproductionenvironment approval)Secrets Management
secrets/secrets.yamlSOPS_AGE_KEYin GitHub ActionsNotable Decisions