Skip to content

Commit

Permalink
updating
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Arnold committed Aug 14, 2024
1 parent 6a6b8e0 commit 6304343
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
14 changes: 13 additions & 1 deletion github_files.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,16 @@ resource "github_repository_file" "extra_files" {
}
}


resource "github_repository_file" "managed_extra_files" {
for_each = tomap({ for file in var.managed_extra_files : "${element(split("/", file.path), length(split("/", file.path)) - 1)}" => file })
repository = github_repository.repo.name
branch = var.github_default_branch
file = each.value.path
content = each.value.content
overwrite_on_create = true
lifecycle {
ignore_changes = [
branch
]
}
}
8 changes: 8 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,14 @@ variable "extra_files" {
description = "Extra Files"
}

variable "managed_extra_files" {
type = list(object({
path = string,
content = string
}))
default = []
description = "Managed Extra Files. Changes to Content will be updated"
}

variable "pull_request_bypassers" {
default = []
Expand Down

0 comments on commit 6304343

Please sign in to comment.