We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 177a5bd commit 27d0fcaCopy full SHA for 27d0fca
main.tf
@@ -23,7 +23,6 @@ locals {
23
path = "/"
24
cname = ""
25
}
26
- pages = merge(local.default_pages, var.pages)
27
28
29
@@ -51,14 +50,14 @@ resource "github_repository" "this" {
51
50
topics = var.topics
52
53
dynamic "pages" {
54
- for_each = [local.pages]
+ for_each = length(var.pages) != 0 ? [var.pages] : []
55
56
content {
57
source {
58
- branch = pages.value.branch
59
- path = pages.value.path
+ branch = lookup(pages.value, "branch", local.default_pages.branch)
+ path = lookup(pages.value, "path", local.default_pages.path)
60
61
- cname = pages.value.cname
+ cname = lookup(pages.value, "cname", local.default_pages.cname)
62
63
64
0 commit comments