Reject fork_from alongside unsupported repository keys
ci/woodpecker/pr/plan Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful

gitea_fork can only express the source repo and owning organisation, so any
other setting in a fork's yaml is silently dropped.

- validate fork_from entries carry no other repository attributes, naming the
  offending config key and attributes
- note that gitea_fork has no archive_on_destroy
This commit is contained in:
2026-09-19 16:03:44 +10:00
parent 9ab540719e
commit 8bc04e2c7d
2 changed files with 14 additions and 0 deletions
@@ -45,6 +45,7 @@ moved {
to = gitea_repository.this[0]
}
# gitea_fork has no archive_on_destroy, so removing a fork from the config deletes the repository instead of archiving it.
resource "gitea_fork" "this" {
count = var.fork_from == null ? 0 : 1