diff --git a/github_files.tf b/github_files.tf index 95cbf7a..57c8de3 100644 --- a/github_files.tf +++ b/github_files.tf @@ -15,7 +15,10 @@ resource "github_repository_file" "codeowners" { commit_author = var.commit_author commit_email = var.commit_email overwrite_on_create = true - depends_on = [github_repository.repo] + depends_on = [ + github_repository.repo, + github_branch_protection.protection + ] lifecycle { ignore_changes = [ content, @@ -60,7 +63,10 @@ resource "github_repository_file" "extra_files" { commit_author = var.commit_author commit_email = var.commit_email overwrite_on_create = true - depends_on = [github_repository.repo] + depends_on = [ + github_repository.repo, + github_branch_protection.protection + ] lifecycle { ignore_changes = [ content, @@ -80,7 +86,10 @@ resource "github_repository_file" "managed_extra_files" { commit_author = var.commit_author commit_email = var.commit_email overwrite_on_create = true - depends_on = [github_repository.repo] + depends_on = [ + github_repository.repo, + github_branch_protection.protection + ] lifecycle { ignore_changes = [ branch