Add proxy networks to e2e harness

This commit is contained in:
Wiktor Niesiobędzki 2024-01-06 09:00:12 +00:00 committed by Wiktor Niesiobędzki
parent a6e377fad2
commit 6e24898850
1 changed files with 31 additions and 0 deletions

View File

@ -82,6 +82,37 @@ resource "google_compute_subnetwork" "subnetwork" {
region = var.region
}
resource "google_compute_subnetwork" "proxy_only_global" {
project = google_project.project.project_id
network = google_compute_network.network.name
name = "proxy-global"
region = var.region
ip_cidr_range = "10.0.17.0/24"
purpose = "GLOBAL_MANAGED_PROXY"
role = "ACTIVE"
lifecycle {
# Until https://github.com/hashicorp/terraform-provider-google/issues/16804 is fixed
# ignore permadiff in ipv6_access_type for proxy_only subnets
ignore_changes = [ipv6_access_type]
}
}
resource "google_compute_subnetwork" "proxy_only_regional" {
project = google_project.project.project_id
network = google_compute_network.network.name
name = "proxy-regional"
region = var.region
ip_cidr_range = "10.0.18.0/24"
purpose = "REGIONAL_MANAGED_PROXY"
role = "ACTIVE"
lifecycle {
# Until https://github.com/hashicorp/terraform-provider-google/issues/16804 is fixed
# ignore permadiff in ipv6_access_type for proxy_only subnets
ignore_changes = [ipv6_access_type]
}
}
resource "google_service_account" "service_account" {
account_id = "e2e-service-account"
project = google_project.project.project_id