diff --git a/image-pipeline.tf b/image-pipeline.tf index a60ba30..dcc5065 100644 --- a/image-pipeline.tf +++ b/image-pipeline.tf @@ -50,7 +50,7 @@ module "asset_releases" { github_repo_description = "Terraform Workspace for publishing image-pipeline-assets" repo_org = "CSVD" name = "image-pipeline-asset-releases" - github_org_teams = local.github_organization_teams + github_org_teams = local.github_organization_teams github_repo_topics = [ "terraform" ] @@ -68,7 +68,7 @@ module "aws_image_pipeline" { github_repo_description = "Terraform Workspace for creating and managing AWS Image Pipelines" repo_org = "CSVD" name = "aws-image-pipeline" - github_org_teams = local.github_organization_teams + github_org_teams = local.github_organization_teams github_repo_topics = [ "terraform" ] @@ -112,7 +112,7 @@ module "terraform_aws_image_pipeline" { github_repo_description = "Terraform Module that creates codepipeline and codebuild jobs and other resources for building and deploying images" repo_org = "CSVD" name = "terraform-aws-image-pipeline" - github_org_teams = local.github_organization_teams + github_org_teams = local.github_organization_teams github_repo_topics = [ "terraform" ] diff --git a/main.tf b/main.tf index e0457de..a10c620 100644 --- a/main.tf +++ b/main.tf @@ -27,7 +27,7 @@ module "elastic_beanstalk" { enforce_prs = false collaborators = local.collaborators pull_request_bypassers = local.pull_request_bypassers - github_org_teams = local.github_organization_teams + github_org_teams = local.github_organization_teams } @@ -273,7 +273,7 @@ module "setup_terraform" { create_codeowners = false enforce_prs = false collaborators = local.collaborators - github_org_teams = local.github_organization_teams + github_org_teams = local.github_organization_teams } module "setup_node" { @@ -289,7 +289,7 @@ module "setup_node" { create_codeowners = false enforce_prs = false collaborators = local.collaborators - github_org_teams = local.github_organization_teams + github_org_teams = local.github_organization_teams } # ghe-runner @@ -306,7 +306,7 @@ module "ghe_runners" { create_codeowners = false enforce_prs = false collaborators = local.collaborators - github_org_teams = local.github_organization_teams + github_org_teams = local.github_organization_teams } module "vpc_services" { diff --git a/morpheus.tf b/morpheus.tf index 132b969..4a82a28 100644 --- a/morpheus.tf +++ b/morpheus.tf @@ -10,7 +10,7 @@ module "morpheus_repos" { source = "HappyPathway/repo/github" #github_codeowners_team = "CSVD" github_repo_description = "Repo for morpheus cloud" - github_org_teams = local.github_organization_teams + github_org_teams = local.github_organization_teams repo_org = "CSVD" name = each.value github_repo_topics = [ diff --git a/repolist.tf b/repolist.tf new file mode 100644 index 0000000..4c11376 --- /dev/null +++ b/repolist.tf @@ -0,0 +1,18 @@ +module "repo_list" { + source = "HappyPathway/repo/github" + for_each = tomap({ for repo in var.repolist : repo.name => repo }) + #github_codeowners_team = "CSVD" + github_repo_description = each.value.description + repo_org = each.value.repo_org + name = each.value.name + github_repo_topics = [ + "terraform" + ] + is_template = each.value.is_template + force_name = true + create_codeowners = false + enforce_prs = each.value.enforce_prs + collaborators = local.collaborators + pull_request_bypassers = local.pull_request_bypassers + github_org_teams = local.github_organization_teams +} diff --git a/sandbox.tf b/sandbox.tf index e80f158..38e5611 100644 --- a/sandbox.tf +++ b/sandbox.tf @@ -19,7 +19,7 @@ module "sandbox" { create_codeowners = false enforce_prs = false collaborators = { "arnol377" : "admin" } - github_org_teams = local.github_organization_teams + github_org_teams = local.github_organization_teams managed_extra_files = [ { path = ".github/workflows/terraform-plan.yaml" diff --git a/varfiles/default b/varfiles/default deleted file mode 100644 index e69de29..0000000 diff --git a/varfiles/default.tfvars b/varfiles/default.tfvars index fa1a342..6ad4a1d 100644 --- a/varfiles/default.tfvars +++ b/varfiles/default.tfvars @@ -1,3 +1,17 @@ image_pipeline_workflows = { "image-pipeline-goss-testing" = "./workflows/goss-testing.yaml" } + +repolist = [ + { + description = "Managing AWS CSVD Secrets" + repo_org = "CSVD" + name = "aws-secrets" + }, + { + description = "Tools for managing Terraform" + repo_org = "CSVD" + name = "tf-tools" + } +] + diff --git a/variables.tf b/variables.tf index 0f1b652..82faa87 100644 --- a/variables.tf +++ b/variables.tf @@ -1,3 +1,15 @@ variable "image_pipeline_workflows" { type = map(string) } + +variable "repolist" { + type = list(object({ + description = string + repo_org = string + name = string + is_template = optional(bool, false) + create_codeowners = optional(bool, false) + enforce_prs = optional(bool, false) + })) + default = [] +}