Context
The Terraform workspace can import and converge the 56 managed repositories, but terraform apply has never been run. github/repositories.tf does not exist yet.
What it would change
The apply was simulated against live API data for all 56 repos before anything was written:
- Descriptions: 0 changes. No repo's derived description differs from what GitHub holds.
- Topics: 2 changes.
GitBranchStateCache gains 20 topics from an empty set. ProjectDirector swaps 4, and its TAGS.md has already been trimmed so dotnet and csharp survive the 20-topic cap.
- Settings: merge methods on 56, wiki off on 54, projects off on 56, homepage filled on 22.
No repository is created or destroyed. Every resource carries prevent_destroy and archive_on_destroy, so Terraform cannot delete a repo. Removing one from the configuration is an error, not a deletion.
Prerequisites
- A GitHub PAT with
admin:org. The current token carries only gist, read:org, repo, and workflow, and org-scoped calls return 403 without it.
- The deprecated-attribute issue should be resolved first, since
default_branch is computed and setting it on github_repository is a no-op.
Acceptance criteria
Note for the implementer
github_repository.topics is computed. Omitting it preserves live topics, setting [] wipes them. local.defaults carries three keys that are not github_repository arguments (default_branch, description_override, topics_override), so the resource must name its fields explicitly rather than splatting the map.
Context
The Terraform workspace can import and converge the 56 managed repositories, but
terraform applyhas never been run.github/repositories.tfdoes not exist yet.What it would change
The apply was simulated against live API data for all 56 repos before anything was written:
GitBranchStateCachegains 20 topics from an empty set.ProjectDirectorswaps 4, and itsTAGS.mdhas already been trimmed sodotnetandcsharpsurvive the 20-topic cap.No repository is created or destroyed. Every resource carries
prevent_destroyandarchive_on_destroy, so Terraform cannot delete a repo. Removing one from the configuration is an error, not a deletion.Prerequisites
admin:org. The current token carries onlygist,read:org,repo, andworkflow, and org-scoped calls return 403 without it.default_branchis computed and setting it ongithub_repositoryis a no-op.Acceptance criteria
github/repositories.tfwritten, withprevent_destroyandarchive_on_destroyon every resourcegithub/imports.tfwritten usingimportblocks withfor_eachterraform planreturns a clean exit code 0github/imports.tfdeleted after the first successful applyNote for the implementer
github_repository.topicsis computed. Omitting it preserves live topics, setting[]wipes them.local.defaultscarries three keys that are notgithub_repositoryarguments (default_branch,description_override,topics_override), so the resource must name its fields explicitly rather than splatting the map.