diff --git a/modules/core_project_factory/outputs.tf b/modules/core_project_factory/outputs.tf index 8c55a02a8..926b15119 100644 --- a/modules/core_project_factory/outputs.tf +++ b/modules/core_project_factory/outputs.tf @@ -19,7 +19,7 @@ output "project_name" { } output "project_id" { - value = "${google_project.main.project_id}" + value = "${element(concat(google_project_service.project_services.*.project, list(local.project_id)), 0)}" } output "project_number" { diff --git a/modules/project_services/README.md b/modules/project_services/README.md index 8a4ebbc6a..020ce20c4 100644 --- a/modules/project_services/README.md +++ b/modules/project_services/README.md @@ -27,10 +27,10 @@ See [examples/project_services](./examples/project_services) for an example. | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| -| activate\_apis | The list of apis to activate within the project | list | n/a | yes | -| disable\_services\_on\_destroy | Whether project services will be disabled when the resources are destroyed. https://www.terraform.io/docs/providers/google/r/google_project_service.html#disable_on_destroy | string | `"true"` | no | -| enable\_apis | Whether to actually enable the APIs. If false, this module is a no-op. | string | `"true"` | no | -| project\_id | The GCP project you want to enable APIs on | string | n/a | yes | +| activate\_apis | The list of apis to activate within the project | list | - | yes | +| disable\_services\_on\_destroy | Whether project services will be disabled when the resources are destroyed. https://www.terraform.io/docs/providers/google/r/google_project_service.html#disable_on_destroy | string | `true` | no | +| enable\_apis | Whether to actually enable the APIs. If false, this module is a no-op. | string | `true` | no | +| project\_id | The GCP project you want to enable APIs on | string | - | yes | ## Outputs diff --git a/modules/project_services/examples/project_services/README.md b/modules/project_services/examples/project_services/README.md index 98c58d0e0..ea3c18744 100755 --- a/modules/project_services/examples/project_services/README.md +++ b/modules/project_services/examples/project_services/README.md @@ -12,8 +12,8 @@ Expected variables: | Name | Description | Type | Default | Required | |------|-------------|:----:|:-----:|:-----:| -| credentials\_path | Path to a service account credentials file with rights to run the Project Factory. If this file is absent Terraform will fall back to Application Default Credentials. | string | `""` | no | -| project\_id | The GCP project you want to enable APIs on | string | n/a | yes | +| credentials\_path | Path to a Service Account credentials file with permissions documented in the readme | string | - | yes | +| project\_id | The GCP project you want to enable APIs on | string | - | yes | ## Outputs diff --git a/modules/project_services/outputs.tf b/modules/project_services/outputs.tf index c764afa54..46578bd27 100644 --- a/modules/project_services/outputs.tf +++ b/modules/project_services/outputs.tf @@ -16,5 +16,5 @@ output "project_id" { description = "The GCP project you want to enable APIs on" - value = "${element(concat(google_project_service.project_services.*.project, list("")),0)}" + value = "${element(concat(google_project_service.project_services.*.project, list("")), 0)}" }