From 6e24898850f69a93b68ac7cc429f8d8360269920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wiktor=20Niesiob=C4=99dzki?= Date: Sat, 6 Jan 2024 09:00:12 +0000 Subject: [PATCH] Add proxy networks to e2e harness --- tests/examples_e2e/setup_module/main.tf | 31 +++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/examples_e2e/setup_module/main.tf b/tests/examples_e2e/setup_module/main.tf index 4d09f80f..d212f582 100644 --- a/tests/examples_e2e/setup_module/main.tf +++ b/tests/examples_e2e/setup_module/main.tf @@ -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