Skip to content

Commit

Permalink
fix: Simplify project_id output in core_project_factory (#572)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinPetkov authored Apr 5, 2021
1 parent 02cda62 commit 1bde0af
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions modules/core_project_factory/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,13 @@ output "project_name" {
}

output "project_id" {
value = element(
concat(
[module.project_services.project_id],
[google_project.main.project_id],
[var.enable_shared_vpc_service_project ? google_compute_shared_vpc_service_project.shared_vpc_attachment[0].id : ""],
[var.enable_shared_vpc_host_project ? google_compute_shared_vpc_host_project.shared_vpc_host[0].id : ""],
),
0,
)
depends_on = [module.project_services]
value = module.project_services.project_id
depends_on = [
module.project_services,
google_project.main,
google_compute_shared_vpc_service_project.shared_vpc_attachment,
google_compute_shared_vpc_host_project.shared_vpc_host,
]
}

output "project_number" {
Expand Down

0 comments on commit 1bde0af

Please sign in to comment.