Skip to content

Commit

Permalink
Fix default region and remove outputs required for tests from examples
Browse files Browse the repository at this point in the history
  • Loading branch information
rjerrems committed Nov 20, 2019
1 parent eefdc1a commit f6887cb
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 28 deletions.
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export TF_VAR_folder_id="your_folder_id"
export TF_VAR_billing_account="your_billing_account_id"
export TF_VAR_group_org_admins="[email protected]"
export TF_VAR_group_billing_admins="[email protected]"
export TF_VAR_default_region="your-default-region1"
```

With these settings in place, you can prepare a test project using Docker:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ For the cloudbuild submodule, see the README [cloudbuild](./modules/cloudbuild).
|------|-------------|:----:|:-----:|:-----:|
| activate\_apis | List of APIs to enable in the seed project. | list(string) | `<list>` | no |
| billing\_account | The ID of the billing account to associate projects with. | string | n/a | yes |
| default\_region | Default region to create resources where applicable. | string | `"us-central-1"` | no |
| default\_region | Default region to create resources where applicable. | string | `"us-central1"` | no |
| folder\_id | The ID of a folder to host this project | string | `""` | no |
| group\_billing\_admins | Google Group for GCP Billing Administrators | string | n/a | yes |
| group\_org\_admins | Google Group for GCP Organization Administrators | string | n/a | yes |
Expand Down
4 changes: 1 addition & 3 deletions examples/cloudbuild_enabled/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This example combines the Organization bootstrap module with the Cloud Build sub
| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| billing\_account | The ID of the billing account to associate projects with. | string | n/a | yes |
| default\_region | Default region to create resources where applicable. | string | n/a | yes |
| default\_region | Default region to create resources where applicable. | string | `"us-central1"` | no |
| group\_billing\_admins | Google Group for GCP Billing Administrators | string | n/a | yes |
| group\_org\_admins | Google Group for GCP Organization Administrators | string | n/a | yes |
| org\_id | GCP Organization ID | string | n/a | yes |
Expand All @@ -22,8 +22,6 @@ This example combines the Organization bootstrap module with the Cloud Build sub
| csr\_repos | |
| gcs\_bucket\_cloudbuild\_artifacts | |
| gcs\_bucket\_tfstate | |
| group\_billing\_admins | |
| group\_org\_admins | |
| kms\_crypto\_key | |
| kms\_keyring | |
| seed\_project\_id | |
Expand Down
8 changes: 0 additions & 8 deletions examples/cloudbuild_enabled/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@
* limitations under the License.
*/

output "group_org_admins" {
value = var.group_org_admins
}

output "group_billing_admins" {
value = var.group_billing_admins
}

output "seed_project_id" {
value = module.seed_bootstrap.seed_project_id
}
Expand Down
2 changes: 2 additions & 0 deletions examples/cloudbuild_enabled/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ variable "group_billing_admins" {

variable "default_region" {
description = "Default region to create resources where applicable."
type = string
default = "us-central1"
}

variable "org_project_creators" {
Expand Down
4 changes: 1 addition & 3 deletions examples/simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This example demonstrates the simplest usage of the GCP organization bootstrap m
| Name | Description | Type | Default | Required |
|------|-------------|:----:|:-----:|:-----:|
| billing\_account | The ID of the billing account to associate projects with. | string | n/a | yes |
| default\_region | Default region to create resources where applicable. | string | n/a | yes |
| default\_region | Default region to create resources where applicable. | string | `"us-central1"` | no |
| group\_billing\_admins | Google Group for GCP Billing Administrators | string | n/a | yes |
| group\_org\_admins | Google Group for GCP Organization Administrators | string | n/a | yes |
| org\_id | GCP Organization ID | string | n/a | yes |
Expand All @@ -19,8 +19,6 @@ This example demonstrates the simplest usage of the GCP organization bootstrap m
| Name | Description |
|------|-------------|
| gcs\_bucket\_tfstate | |
| group\_billing\_admins | |
| group\_org\_admins | |
| seed\_project\_id | |
| terraform\_sa\_email | |
| terraform\_sa\_name | |
Expand Down
8 changes: 0 additions & 8 deletions examples/simple/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@
* limitations under the License.
*/

output "group_org_admins" {
value = var.group_org_admins
}

output "group_billing_admins" {
value = var.group_billing_admins
}

output "seed_project_id" {
value = module.seed_bootstrap.seed_project_id
}
Expand Down
2 changes: 2 additions & 0 deletions examples/simple/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ variable "group_billing_admins" {

variable "default_region" {
description = "Default region to create resources where applicable."
type = string
default = "us-central1"
}

variable "org_project_creators" {
Expand Down
2 changes: 1 addition & 1 deletion modules/cloudbuild/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Functional examples and sample Cloud Build definitions are included in the [exam
| activate\_apis | List of APIs to enable in the Cloudbuild project. | list(string) | `<list>` | no |
| billing\_account | The ID of the billing account to associate projects with. | string | n/a | yes |
| cloud\_source\_repos | List of Cloud Source Repo's to create with CloudBuild triggers. | list(string) | `<list>` | no |
| default\_region | Default region to create resources where applicable. | string | `"us-central-1"` | no |
| default\_region | Default region to create resources where applicable. | string | `"us-central1"` | no |
| folder\_id | The ID of a folder to host this project | string | `""` | no |
| group\_org\_admins | Google Group for GCP Organization Administrators | string | n/a | yes |
| org\_id | GCP Organization ID | string | n/a | yes |
Expand Down
2 changes: 1 addition & 1 deletion modules/cloudbuild/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ variable "group_org_admins" {
variable "default_region" {
description = "Default region to create resources where applicable."
type = string
default = "us-central-1"
default = "us-central1"
}

variable "terraform_sa_email" {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/cloudbuild_enabled/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

output "group_org_admins" {
value = module.cloudbuild_enabled.group_org_admins
value = var.group_org_admins
}

output "seed_project_id" {
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/cloudbuild_enabled/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ variable "group_billing_admins" {
variable "default_region" {
description = "Default region to create resources where applicable."
type = string
default = "us-central1"
}

variable "org_project_creators" {
Expand Down
1 change: 1 addition & 0 deletions test/fixtures/simple/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ variable "group_billing_admins" {
variable "default_region" {
description = "Default region to create resources where applicable."
type = string
default = "us-central1"
}

variable "org_project_creators" {
Expand Down
2 changes: 2 additions & 0 deletions test/setup/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ variable "group_billing_admins" {

variable "default_region" {
description = "Default region to create resources where applicable."
type = string
default = "us-central1"
}
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ variable "group_billing_admins" {
variable "default_region" {
description = "Default region to create resources where applicable."
type = string
default = "us-central-1"
default = "us-central1"
}

/******************************************
Expand Down

0 comments on commit f6887cb

Please sign in to comment.