github.com/pmcatominey/terraform@v0.7.0-rc2.0.20160708105029-1401a52a5cc5/website/source/docs/providers/google/r/compute_target_http_proxy.html.markdown (about) 1 --- 2 layout: "google" 3 page_title: "Google: google_compute_target_http_proxy" 4 sidebar_current: "docs-google-compute-target-http-proxy" 5 description: |- 6 Creates a Target HTTP Proxy resource in GCE. 7 --- 8 9 # google\_compute\_target\_http\_proxy 10 11 Creates a target HTTP proxy resource in GCE. For more information see 12 [the official 13 documentation](https://cloud.google.com/compute/docs/load-balancing/http/target-proxies) and 14 [API](https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies). 15 16 17 ## Example Usage 18 19 ```js 20 resource "google_compute_target_http_proxy" "default" { 21 name = "test-proxy" 22 description = "a description" 23 url_map = "${google_compute_url_map.default.self_link}" 24 } 25 26 resource "google_compute_url_map" "default" { 27 name = "url-map" 28 description = "a description" 29 30 default_service = "${google_compute_backend_service.default.self_link}" 31 32 host_rule { 33 hosts = ["mysite.com"] 34 path_matcher = "allpaths" 35 } 36 37 path_matcher { 38 name = "allpaths" 39 default_service = "${google_compute_backend_service.default.self_link}" 40 41 path_rule { 42 paths = ["/*"] 43 service = "${google_compute_backend_service.default.self_link}" 44 } 45 } 46 } 47 48 resource "google_compute_backend_service" "default" { 49 name = "default-backend" 50 port_name = "http" 51 protocol = "HTTP" 52 timeout_sec = 10 53 54 health_checks = ["${google_compute_http_health_check.default.self_link}"] 55 } 56 57 resource "google_compute_http_health_check" "default" { 58 name = "test" 59 request_path = "/" 60 check_interval_sec = 1 61 timeout_sec = 1 62 } 63 ``` 64 65 ## Argument Reference 66 67 The following arguments are supported: 68 69 * `name` - (Required) A unique name for the resource, required by GCE. Changing 70 this forces a new resource to be created. 71 72 * `url_map` - (Required) The URL of a URL Map resource that defines the mapping 73 from the URL to the BackendService. 74 75 - - - 76 77 * `description` - (Optional) A description of this resource. Changing this 78 forces a new resource to be created. 79 80 81 ## Attributes Reference 82 83 In addition to the arguments listed above, the following computed attributes are 84 exported: 85 86 * `id` - A unique ID assigned by GCE. 87 88 * `self_link` - The URI of the created resource.