Skip to content

Commit

Permalink
fix: Add dependency on Shared VPC attachment (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathkkb authored Jul 22, 2020
1 parent 7ec34ef commit c954990
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions examples/shared_vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,15 @@ module "service-project-b" {

disable_services_on_destroy = "false"
}

/******************************************
Example dependency on service-project
*****************************************/

resource "google_compute_address" "example_address" {
project = module.service-project.project_id
region = "us-west1"
subnetwork = module.vpc.subnets_self_links[0]
name = "test-address"
address_type = "INTERNAL"
}
1 change: 1 addition & 0 deletions modules/core_project_factory/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ output "project_id" {
concat(
[module.project_services.project_id],
[google_project.main.project_id],
[var.shared_vpc_enabled ? google_compute_shared_vpc_service_project.shared_vpc_attachment[0].id : ""],
),
0,
)
Expand Down

0 comments on commit c954990

Please sign in to comment.