Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glb and armor subnet fix #2058

Merged
merged 6 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion blueprints/networking/psc-glb-and-armor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,5 @@ module "psc-glb-and-armor-test" {
consumer_project_id = "project-1"
producer_project_id = "project-2"
}
# tftest modules=3 resources=31
# tftest modules=3 resources=32
```
22 changes: 16 additions & 6 deletions blueprints/networking/psc-glb-and-armor/producer.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ resource "google_compute_region_network_endpoint_group" "neg" {
}

resource "google_compute_forwarding_rule" "psc_ilb_target_service" {
name = "producer-forwarding-rule"
region = var.region
project = module.producer_project.project_id

name = "producer-forwarding-rule"
region = var.region
project = module.producer_project.project_id
depends_on = [google_compute_subnetwork.proxy_subnet]
load_balancing_scheme = "INTERNAL_MANAGED"
port_range = "443"
allow_global_access = true
Expand Down Expand Up @@ -156,11 +156,21 @@ resource "google_compute_subnetwork" "ilb_subnetwork" {
project = module.producer_project.project_id

network = google_compute_network.psc_ilb_network.id
ip_cidr_range = "10.0.0.0/16"
purpose = "INTERNAL_HTTPS_LOAD_BALANCER"
ip_cidr_range = "10.0.0.0/24"
role = "ACTIVE"
}

resource "google_compute_subnetwork" "proxy_subnet" {
name = "l7-ilb-proxy-subnet"
provider = google-beta
ip_cidr_range = "10.0.1.0/24"
region = var.region
project = module.producer_project.project_id
purpose = "REGIONAL_MANAGED_PROXY"
role = "ACTIVE"
network = google_compute_network.psc_ilb_network.id
}

resource "google_compute_subnetwork" "psc_private_subnetwork" {
name = "psc-private-subnetwork"
region = var.region
Expand Down
Loading