github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/google/r/compute_target_https_proxy.html.markdown (about) 1 --- 2 layout: "google" 3 page_title: "Google: google_compute_target_https_proxy" 4 sidebar_current: "docs-google-compute-target-https-proxy" 5 description: |- 6 Creates a Target HTTPS Proxy resource in GCE. 7 --- 8 9 # google\_compute\_target\_https\_proxy 10 11 Creates a target HTTPS 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/targetHttpsProxies). 15 16 17 ## Example Usage 18 19 ```hcl 20 resource "google_compute_target_https_proxy" "default" { 21 name = "test-proxy" 22 description = "a description" 23 url_map = "${google_compute_url_map.default.self_link}" 24 ssl_certificates = ["${google_compute_ssl_certificate.default.self_link}"] 25 } 26 27 resource "google_compute_ssl_certificate" "default" { 28 name = "my-certificate" 29 description = "a description" 30 private_key = "${file("path/to/private.key")}" 31 certificate = "${file("path/to/certificate.crt")}" 32 } 33 34 resource "google_compute_url_map" "default" { 35 name = "url-map" 36 description = "a description" 37 38 default_service = "${google_compute_backend_service.default.self_link}" 39 40 host_rule { 41 hosts = ["mysite.com"] 42 path_matcher = "allpaths" 43 } 44 45 path_matcher { 46 name = "allpaths" 47 default_service = "${google_compute_backend_service.default.self_link}" 48 49 path_rule { 50 paths = ["/*"] 51 service = "${google_compute_backend_service.default.self_link}" 52 } 53 } 54 } 55 56 resource "google_compute_backend_service" "default" { 57 name = "default-backend" 58 port_name = "http" 59 protocol = "HTTP" 60 timeout_sec = 10 61 62 health_checks = ["${google_compute_http_health_check.default.self_link}"] 63 } 64 65 resource "google_compute_http_health_check" "default" { 66 name = "test" 67 request_path = "/" 68 check_interval_sec = 1 69 timeout_sec = 1 70 } 71 ``` 72 73 ## Argument Reference 74 75 The following arguments are supported: 76 77 * `name` - (Required) A unique name for the resource, required by GCE. Changing 78 this forces a new resource to be created. 79 80 * `ssl_certificates` - (Required) The URLs of the SSL Certificate resources that 81 authenticate connections between users and load balancing. Currently exactly 82 one must be specified. 83 84 * `url_map` - (Required) The URL of a URL Map resource that defines the mapping 85 from the URL to the BackendService. 86 87 - - - 88 89 * `description` - (Optional) A description of this resource. Changing this 90 forces a new resource to be created. 91 92 * `project` - (Optional) The project in which the resource belongs. If it 93 is not provided, the provider project is used. 94 95 ## Attributes Reference 96 97 In addition to the arguments listed above, the following computed attributes are 98 exported: 99 100 * `id` - A unique ID assigned by GCE. 101 102 * `self_link` - The URI of the created resource.