From a5856eee0dbfc1c8214c5a0b184479d8e3119047 Mon Sep 17 00:00:00 2001 From: David Arnold <10138997+djaboxx@users.noreply.github.com> Date: Sat, 12 Apr 2025 12:21:25 -0700 Subject: [PATCH] Ref conditional1 (#26) * fix: update extra_files logic to handle empty ref cases and improve repository access safety * fix: update default_branch output to use variable for new repositories * terraform-docs: automated action --------- Co-authored-by: Dave Arnold Co-authored-by: github-actions[bot] --- outputs.tf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/outputs.tf b/outputs.tf index 7c11c8c..2b04b55 100644 --- a/outputs.tf +++ b/outputs.tf @@ -45,9 +45,12 @@ output "visibility" { output "default_branch" { description = "Default branch of the repository" - value = var.create_repo ? github_repository.repo[0].default_branch : data.github_repository.existing[0].default_branch + value = var.create_repo ? var.github_default_branch : data.github_repository.existing[0].default_branch } +# resource "github_branch_default" "default_main_branch" { +# count = var.github_default_branch != "main" ? 1 : 0 + output "topics" { description = "List of topics applied to the repository" value = var.create_repo ? github_repository.repo[0].topics : data.github_repository.existing[0].topics