diff options
author | Franck Cuny <franck@fcuny.net> | 2022-10-22 11:20:04 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2022-10-22 11:20:04 -0700 |
commit | e44398e45c96a9a3a12a0bfeba7597ad5438c36e (patch) | |
tree | 97a078536ac56c703b3e7c58dda1b9dc98c02717 /ops/github | |
parent | feat(templates): add a template for rust (diff) | |
download | world-e44398e45c96a9a3a12a0bfeba7597ad5438c36e.tar.gz |
fix(ops/github): some fixes related to repositories creation
Diffstat (limited to 'ops/github')
-rw-r--r-- | ops/github/repositories.tf | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ops/github/repositories.tf b/ops/github/repositories.tf index 2465d43..15a5b1d 100644 --- a/ops/github/repositories.tf +++ b/ops/github/repositories.tf @@ -7,7 +7,7 @@ resource "github_repository" "repos" { name = try(each.value.name, each.key) visibility = each.value.visibility - archived = each.value.archived + archived = try(each.value.archived, false) description = try(each.value.description, null) has_downloads = false has_issues = try(each.value.has_issues, true) @@ -17,7 +17,7 @@ resource "github_repository" "repos" { allow_squash_merge = true allow_rebase_merge = true vulnerability_alerts = try(each.value.vulnerability_alerts, false) - delete_branch_on_merge = try(each.value.vulnerability_alerts, false) + delete_branch_on_merge = try(!each.value.archived, true) } resource "github_branch_default" "main" { @@ -26,7 +26,7 @@ resource "github_branch_default" "main" { # use the name for the repository if set for_each = { for k, v in local.repositories : try(v.name, k) => v - if v.archived == false + if try(v.archived, false) == false } repository = each.key |