From 9953bff0198b3304b83a92de234cc909c37f7058 Mon Sep 17 00:00:00 2001 From: Vincent Roseberry Date: Tue, 24 Apr 2018 10:39:46 -0700 Subject: [PATCH 1/2] Release TargetHttpProxy resource in Terraform --- products/compute/api.yaml | 8 ++++++ products/compute/terraform.yaml | 47 ++++++++++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/products/compute/api.yaml b/products/compute/api.yaml index 00136185455a..30c74427755c 100644 --- a/products/compute/api.yaml +++ b/products/compute/api.yaml @@ -2589,10 +2589,18 @@ objects: name: 'TargetHttpProxy' kind: 'compute#targetHttpProxy' base_url: projects/{{project}}/global/targetHttpProxies + exports: + - !ruby/object:Api::Type::SelfLink + name: 'selfLink' input: true description: | Represents a TargetHttpProxy resource, which is used by one or more global forwarding rule to route incoming HTTP requests to a URL map. + references: !ruby/object:Api::Resource::ReferenceLinks + guides: + 'Official Documentation': + 'https://cloud.google.com/compute/docs/load-balancing/http/target-proxies' + api: 'https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies' <%= indent(compile_file({}, 'templates/global_async.yaml.erb'), 4) %> properties: - !ruby/object:Api::Type::Time diff --git a/products/compute/terraform.yaml b/products/compute/terraform.yaml index 2626567ef16d..b35919d20cdc 100644 --- a/products/compute/terraform.yaml +++ b/products/compute/terraform.yaml @@ -193,7 +193,52 @@ overrides: !ruby/object:Provider::ResourceOverrides validation: !ruby/object:Provider::Terraform::Validation function: 'validateIpCidrRange' TargetHttpProxy: !ruby/object:Provider::Terraform::ResourceOverride - exclude: true + examples: | + ```hcl + resource "google_compute_target_http_proxy" "default" { + name = "test-proxy" + description = "a description" + url_map = "${google_compute_url_map.default.self_link}" + } + + resource "google_compute_url_map" "default" { + name = "url-map" + description = "a description" + + default_service = "${google_compute_backend_service.default.self_link}" + + host_rule { + hosts = ["mysite.com"] + path_matcher = "allpaths" + } + + path_matcher { + name = "allpaths" + default_service = "${google_compute_backend_service.default.self_link}" + + path_rule { + paths = ["/*"] + service = "${google_compute_backend_service.default.self_link}" + } + } + } + + resource "google_compute_backend_service" "default" { + name = "default-backend" + port_name = "http" + protocol = "HTTP" + timeout_sec = 10 + + health_checks = ["${google_compute_http_health_check.default.self_link}"] + } + + resource "google_compute_http_health_check" "default" { + name = "test" + request_path = "/" + check_interval_sec = 1 + timeout_sec = 1 + } + ``` properties: id: !ruby/object:Provider::Terraform::PropertyOverride name: proxyId From ac89e637985b1ca44beda7a1c4be58dcdbdc45fc Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Fri, 27 Apr 2018 01:07:44 +0000 Subject: [PATCH 2/2] Update terraform -> HEAD on Fri Apr 27 01:07:44 UTC 2018 --- build/terraform | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/terraform b/build/terraform index 31a5c9d93c90..b3a722ee3953 160000 --- a/build/terraform +++ b/build/terraform @@ -1 +1 @@ -Subproject commit 31a5c9d93c903019ddebd08aed7856d896f9ccca +Subproject commit b3a722ee3953a40541179af45c9ee13c294fcb11