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 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