Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions modules/plain-repo/repos.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ resource "github_repository" "repo" {
delete_branch_on_merge = true
allow_auto_merge = var.allow_auto_merge

dynamic "pages" {
for_each = var.enable_pages ? [1] : []
content {
build_type = "workflow"
source {
branch = "main"
path = "/"
}
}
}
}

resource "github_team_repository" "dev" {
Expand Down
7 changes: 7 additions & 0 deletions modules/plain-repo/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,10 @@ variable "has_projects" {
default = true
nullable = false
}

variable "enable_pages" {
description = "Enable GitHub Pages for the repository"
type = bool
default = false
nullable = false
}
2 changes: 2 additions & 0 deletions repos.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ locals {
"secrets" = {
"CI_TEST_TOKEN" = module.github-token.secret_value
}
enable_pages = true
}
"terraform-aws-aerospike" = {
"description" = "Module that deploys Aerospike cluster."
Expand Down Expand Up @@ -315,6 +316,7 @@ module "repos" {
allow_auto_merge = try(each.value["auto_merge"], null)
repo_type = try(each.value["type"], null)
anthropic_api_key = module.anthropic_api_key.secret_value
enable_pages = try(each.value["enable_pages"], false)
secrets = merge(
contains(keys(each.value), "secrets") ? each.value["secrets"] : {},
merge(
Expand Down