github.com/turtlemonvh/terraform@v0.6.9-0.20151204001754-8e40b6b855e8/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](http://cloud.google.com/compute/docs/load-balancing/http/target-proxies) and 14 [API](http://cloud.google.com/compute/docs/reference/latest/targetHttpProxies). 15 16 17 ## Example Usage 18 19 ``` 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 default_service = "${google_compute_backend_service.default.self_link}" 30 31 host_rule { 32 hosts = ["mysite.com"] 33 path_matcher = "allpaths" 34 } 35 36 path_matcher { 37 default_service = "${google_compute_backend_service.default.self_link}" 38 name = "allpaths" 39 path_rule { 40 paths = ["/*"] 41 service = "${google_compute_backend_service.default.self_link}" 42 } 43 } 44 } 45 46 resource "google_compute_backend_service" "default" { 47 name = "default-backend" 48 port_name = "http" 49 protocol = "HTTP" 50 timeout_sec = 10 51 region = "us-central1" 52 53 health_checks = ["${google_compute_http_health_check.default.self_link}"] 54 } 55 56 resource "google_compute_http_health_check" "default" { 57 name = "test" 58 request_path = "/" 59 check_interval_sec = 1 60 timeout_sec = 1 61 } 62 ``` 63 64 ## Argument Reference 65 66 The following arguments are supported: 67 68 * `name` - (Required) A unique name for the resource, required by GCE. 69 Changing this forces a new resource to be created. 70 * `description` - (Optional) A description of this resource. 71 Changing this forces a new resource to be created. 72 * `url_map` - (Required) The URL of a URL Map resource that defines the 73 mapping from the URL to the BackendService. 74 75 ## Attributes Reference 76 77 The following attributes are exported: 78 79 * `self_link` - The URI of the created resource. 80 * `id` - A unique ID assigned by GCE.