From 6c06a50c9ed112eedbb248922d44b080f4c9f589 Mon Sep 17 00:00:00 2001 From: Alex Ellis Date: Wed, 26 Jan 2022 11:54:24 -0500 Subject: [PATCH] Add EXTERNAL_MANAGED option to global forwarding rule and add example (#5611) --- mmv1/products/compute/terraform.yaml | 16 +--------------- ...lobal_forwarding_rule_external_managed.tf.erb | 4 ++++ 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/mmv1/products/compute/terraform.yaml b/mmv1/products/compute/terraform.yaml index baf243f919ad..b12823b1979b 100644 --- a/mmv1/products/compute/terraform.yaml +++ b/mmv1/products/compute/terraform.yaml @@ -1031,6 +1031,7 @@ overrides: !ruby/object:Overrides::ResourceOverrides - "target" - !ruby/object:Provider::Terraform::Examples name: "global_forwarding_rule_external_managed" + min_version: beta primary_resource_id: "default" vars: forwarding_rule_name: "global-rule" @@ -1039,21 +1040,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides ignore_read_extra: - "port_range" - "target" - - !ruby/object:Provider::Terraform::Examples - name: "global_forwarding_rule_hybrid" - primary_resource_id: "default" - vars: - forwarding_rule_name: "global-rule" - http_proxy_name: "target-proxy" - network_name: "my-network" - default_backend_service_name: "backend-default" - hybrid_backend_service_name: "backend-hybrid" - default_neg_name: "default-neg" - hybrid_neg_name: "hybrid-neg" - health_check_name: "health-check" - ignore_read_extra: - - "port_range" - - "target" - !ruby/object:Provider::Terraform::Examples name: "private_service_connect_google_apis" min_version: beta diff --git a/mmv1/templates/terraform/examples/global_forwarding_rule_external_managed.tf.erb b/mmv1/templates/terraform/examples/global_forwarding_rule_external_managed.tf.erb index 1761aaf8bf3b..1d38a0ee420b 100644 --- a/mmv1/templates/terraform/examples/global_forwarding_rule_external_managed.tf.erb +++ b/mmv1/templates/terraform/examples/global_forwarding_rule_external_managed.tf.erb @@ -1,4 +1,5 @@ resource "google_compute_global_forwarding_rule" "default" { + provider = google-beta name = "<%= ctx[:vars]['forwarding_rule_name'] %>" target = google_compute_target_http_proxy.default.id port_range = "80" @@ -6,12 +7,14 @@ resource "google_compute_global_forwarding_rule" "default" { } resource "google_compute_target_http_proxy" "default" { + provider = google-beta name = "<%= ctx[:vars]['http_proxy_name'] %>" description = "a description" url_map = google_compute_url_map.default.id } resource "google_compute_url_map" "default" { + provider = google-beta name = "url-map-<%= ctx[:vars]['http_proxy_name'] %>" description = "a description" default_service = google_compute_backend_service.default.id @@ -33,6 +36,7 @@ resource "google_compute_url_map" "default" { } resource "google_compute_backend_service" "default" { + provider = google-beta name = "<%= ctx[:vars]['backend_service_name'] %>" port_name = "http" protocol = "HTTP"