diff --git a/locals.tf b/locals.tf index 30494ed..bc33459 100644 --- a/locals.tf +++ b/locals.tf @@ -124,7 +124,7 @@ locals { environment = var.environment region = var.region cluster_dir = "platform-cluster" - enable_all_modules = false + enable_all_modules = var.enable_all_modules account = { account_name = var.cluster_config.account_name aws_account_id = var.cluster_config.aws_account_id diff --git a/main.tf b/main.tf index 1027f77..54593d6 100644 --- a/main.tf +++ b/main.tf @@ -14,7 +14,11 @@ module "github_repo" { github_has_wiki = true github_has_projects = true - managed_extra_files = local.managed_extra_files + managed_extra_files = concat( + local.managed_extra_files, + var.managed_extra_files + ) + extra_files = var.extra_files } resource "null_resource" "trigger_workflow" { @@ -25,11 +29,11 @@ resource "null_resource" "trigger_workflow" { provisioner "local-exec" { command = "python3 scripts/trigger_workflow.py ${module.github_repo.full_name} cluster-plan '{\"environment\":\"${var.environment}\",\"region\":\"${var.region}\",\"cluster_dir\":\"${var.cluster_config.cluster_name}\",\"auto_approve\":true}'" - environment = { - GITHUB_TOKEN = var.github_token - GITHUB_OWNER = var.organization - GITHUB_SERVER_URL = var.github_server_url - } + # environment = { + # GITHUB_TOKEN = var.github_token + # GITHUB_OWNER = var.organization + # GITHUB_SERVER_URL = var.github_server_url + # } } depends_on = [module.github_repo] diff --git a/variables.tf b/variables.tf index cab10ae..0c78add 100644 --- a/variables.tf +++ b/variables.tf @@ -212,4 +212,28 @@ variable "github_server_url" { description = "GitHub Enterprise server URL (e.g., https://github.e.it.census.gov)" type = string default = "https://api.github.com" +} + +variable enable_all_modules { + description = "Enable all modules" + type = bool + default = false +} + +variable "managed_extra_files" { + description = "List of extra files to manage in the repository" + type = list(object({ + path = string + content = string + })) + default = [] +} + +variable "extra_files" { + description = "List of extra files to add to the repository" + type = list(object({ + path = string + content = string + })) + default = [] } \ No newline at end of file