Skip to content

Commit

Permalink
feat: Move Cloud Source Repo definition to variable. (#302)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaroslawgajewski authored and bharathkkb committed Mar 31, 2021
1 parent 18afb15 commit 48037c9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions 0-bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Currently, the bucket information is replaced in the state backends as a part of
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| billing\_account | The ID of the billing account to associate projects with. | `string` | n/a | yes |
| cloud\_source\_repos | List of Cloud Source Reposiories created during bootrstap project build stage | `list(string)` | <pre>[<br> "gcp-bootstrap",<br> "gcp-org",<br> "gcp-environments",<br> "gcp-networks",<br> "gcp-projects"<br>]</pre> | no |
| default\_region | Default region to create resources where applicable. | `string` | `"us-central1"` | no |
| folder\_prefix | Name prefix to use for folders created. | `string` | `"fldr"` | no |
| group\_billing\_admins | Google Group for GCP Billing Administrators | `string` | n/a | yes |
Expand Down
8 changes: 1 addition & 7 deletions 0-bootstrap/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ module "cloudbuild_bootstrap" {
cloudbuild_plan_filename = "cloudbuild-tf-plan.yaml"
cloudbuild_apply_filename = "cloudbuild-tf-apply.yaml"
project_prefix = var.project_prefix
cloud_source_repos = var.cloud_source_repos

activate_apis = [
"serviceusage.googleapis.com",
Expand All @@ -155,13 +156,6 @@ module "cloudbuild_bootstrap" {
env_code = "b"
}

cloud_source_repos = [
"gcp-org",
"gcp-environments",
"gcp-networks",
"gcp-projects"
]

terraform_apply_branches = [
"development",
"non\\-production", //non-production needs a \ to ensure regex matches correct branches.
Expand Down
5 changes: 5 additions & 0 deletions 0-bootstrap/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ variable "folder_prefix" {
type = string
default = "fldr"
}
variable "cloud_source_repos" {
description = "List of Cloud Source Reposiories created during bootrstap project build stage"
type = list(string)
default = ["gcp-bootstrap", "gcp-org", "gcp-environments", "gcp-networks", "gcp-projects"]
}

/* ----------------------------------------
Specific to jenkins_bootstrap module
Expand Down

0 comments on commit 48037c9

Please sign in to comment.