Skip to content

Commit 7dc07ac

Browse files
authored
Merge pull request #138 from multiformats/master-upgrade
upgrade@25079219561
2 parents 54f75de + 8f98199 commit 7dc07ac

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7373
- how sync handles pending invitations (now it does not ignore them)
7474
- removed references to other resources from for_each expressions
7575
- downgraded terraform to 1.2.9 to fix an import bug affecting for_each expressions
76+
- refactored pages build_type assignment to trim whitespace

terraform/locals.tf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,13 @@ locals {
122122
for file, config in lookup(config, "files", {}) : merge(config, {
123123
repository = repository
124124
file = file
125-
content = try(file("${path.module}/../files/${config.content}"), config.content)
125+
content = (
126+
try(fileexists("${path.module}/../files/${config.content}"), false) &&
127+
try(startswith(
128+
abspath("${path.module}/../files/${config.content}"),
129+
"${abspath("${path.module}/../files")}/"
130+
), false)
131+
) ? file("${path.module}/../files/${config.content}") : config.content
126132
})
127133
]
128134
]) : lower("${item.repository}/${item.file}") => item

terraform/resources.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ resource "github_repository" "this" {
7474
dynamic "pages" {
7575
for_each = try(each.value.pages, [])
7676
content {
77-
build_type = try(pages.value["build_type"], null)
77+
build_type = trimspace(try(pages.value["build_type"], "")) != "" ? pages.value["build_type"] : null
7878
cname = try(pages.value["cname"], null)
7979
dynamic "source" {
8080
for_each = pages.value["source"]

0 commit comments

Comments
 (0)