Skip to content

Commit

Permalink
Add EXTERNAL_MANAGED option to global forwarding rule and add example (
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Ellis authored and lcaggio committed Mar 18, 2022
1 parent 4e0d499 commit 6c06a50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
16 changes: 1 addition & 15 deletions mmv1/products/compute/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
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"
load_balancing_scheme = "EXTERNAL_MANAGED"
}

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
Expand All @@ -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"
Expand Down

0 comments on commit 6c06a50

Please sign in to comment.