github.com/turtlemonvh/terraform@v0.6.9-0.20151204001754-8e40b6b855e8/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  ```
    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      default_service = "${google_compute_backend_service.default.self_link}"
    38  
    39      host_rule {
    40          hosts = ["mysite.com"]
    41          path_matcher = "allpaths"
    42      }
    43  
    44      path_matcher {
    45          default_service = "${google_compute_backend_service.default.self_link}"
    46          name = "allpaths"
    47          path_rule {
    48              paths = ["/*"]
    49              service = "${google_compute_backend_service.default.self_link}"
    50          }
    51      }
    52  }
    53  
    54  resource "google_compute_backend_service" "default" {
    55      name = "default-backend"
    56      port_name = "http"
    57      protocol = "HTTP"
    58      timeout_sec = 10
    59      region = "us-central1"
    60  
    61      health_checks = ["${google_compute_http_health_check.default.self_link}"]
    62  }
    63  
    64  resource "google_compute_http_health_check" "default" {
    65      name = "test"
    66      request_path = "/"
    67      check_interval_sec = 1
    68      timeout_sec = 1
    69  }
    70  ```
    71  
    72  ## Argument Reference
    73  
    74  The following arguments are supported:
    75  
    76  * `name` - (Required) A unique name for the resource, required by GCE.
    77      Changing this forces a new resource to be created.
    78  * `description` - (Optional) A description of this resource.
    79      Changing this forces a new resource to be created.
    80  * `url_map` - (Required) The URL of a URL Map resource that defines the
    81      mapping from the URL to the BackendService.
    82  * `ssl_certificates` - (Required) The URLs of the SSL Certificate resources
    83      that authenticate connections between users and load balancing. Currently
    84      exactly one must be specified.
    85  
    86  ## Attributes Reference
    87  
    88  The following attributes are exported:
    89  
    90  * `self_link` - The URI of the created resource.
    91  * `id` - A unique ID assigned by GCE.