Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions gh-dependabot.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ resource "github_repository_file" "dependabot" {
content = "# Managed by tfroot-github (gh-dependabot.tf); local edits are overwritten.\n${yamlencode(each.value)}"
commit_message = "chore: sync managed dependabot configuration"
overwrite_on_create = true

# These attributes are creation/commit metadata, not the centrally managed
# file content. Ignoring imported values avoids a protected-branch write when
# adopting a PR-seeded file; future content changes remain managed.
lifecycle {
ignore_changes = [
commit_message,
overwrite_on_create,
]
}
}

locals {
Expand Down Expand Up @@ -106,4 +116,13 @@ resource "github_repository_file" "dependabot_notify" {
content = local.dependabot_notify_workflow
commit_message = "chore: sync managed dependabot notification workflow"
overwrite_on_create = true

# See github_repository_file.dependabot above. The workflow content remains
# managed; only imported creation/commit metadata is ignored.
lifecycle {
ignore_changes = [
commit_message,
overwrite_on_create,
]
}
}
13 changes: 13 additions & 0 deletions imports.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,16 @@ import {
to = github_repository.repositories["channel-project"]
id = "channel-project"
}

# These files were seeded through tfroot-twilio PR #1 because its temporary
# protection rejects direct file creation. Import them before central management
# so the first reconciled apply does not attempt another protected direct write.
import {
to = github_repository_file.dependabot["tfroot-twilio"]
id = "tfroot-twilio:.github/dependabot.yml:"
}

import {
to = github_repository_file.dependabot_notify["tfroot-twilio"]
id = "tfroot-twilio:.github/workflows/dependabot-notify.yml:"
}
Loading