mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-09-07 01:26:43 +00:00
provider/google: Target HTTPS proxy resource + tests & documentation
This commit is contained in:
parent
da139fac94
commit
dc71df8455
91
r/compute_target_https_proxy.html.markdown
Normal file
91
r/compute_target_https_proxy.html.markdown
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
---
|
||||||
|
layout: "google"
|
||||||
|
page_title: "Google: google_compute_target_https_proxy"
|
||||||
|
sidebar_current: "docs-google-compute-target-https-proxy"
|
||||||
|
description: |-
|
||||||
|
Creates a Target HTTPS Proxy resource in GCE.
|
||||||
|
---
|
||||||
|
|
||||||
|
# google\_compute\_target\_https\_proxy
|
||||||
|
|
||||||
|
Creates a target HTTPS proxy resource in GCE. For more information see
|
||||||
|
[the official
|
||||||
|
documentation](https://cloud.google.com/compute/docs/load-balancing/http/target-proxies) and
|
||||||
|
[API](https://cloud.google.com/compute/docs/reference/latest/targetHttpsProxies).
|
||||||
|
|
||||||
|
|
||||||
|
## Example Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
resource "google_compute_target_https_proxy" "default" {
|
||||||
|
name = "test-proxy"
|
||||||
|
description = "a description"
|
||||||
|
url_map = "${google_compute_url_map.default.self_link}"
|
||||||
|
ssl_certificates = ["${google_compute_ssl_certificate.default.self_link}"]
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "google_compute_ssl_certificate" "default" {
|
||||||
|
name = "my-certificate"
|
||||||
|
description = "a description"
|
||||||
|
private_key = "${file("path/to/private.key")}"
|
||||||
|
certificate = "${file("path/to/certificate.crt")}"
|
||||||
|
}
|
||||||
|
|
||||||
|
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 {
|
||||||
|
default_service = "${google_compute_backend_service.default.self_link}"
|
||||||
|
name = "allpaths"
|
||||||
|
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
|
||||||
|
region = "us-central1"
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Argument Reference
|
||||||
|
|
||||||
|
The following arguments are supported:
|
||||||
|
|
||||||
|
* `name` - (Required) A unique name for the resource, required by GCE.
|
||||||
|
Changing this forces a new resource to be created.
|
||||||
|
* `description` - (Optional) A description of this resource.
|
||||||
|
Changing this forces a new resource to be created.
|
||||||
|
* `url_map` - (Required) The URL of a URL Map resource that defines the
|
||||||
|
mapping from the URL to the BackendService.
|
||||||
|
* `ssl_certificates` - (Required) The URLs of the SSL Certificate resources
|
||||||
|
that authenticate connections between users and load balancing. Currently
|
||||||
|
exactly one must be specified.
|
||||||
|
|
||||||
|
## Attributes Reference
|
||||||
|
|
||||||
|
The following attributes are exported:
|
||||||
|
|
||||||
|
* `self_link` - The URI of the created resource.
|
||||||
|
* `id` - A unique ID assigned by GCE.
|
Loading…
Reference in New Issue
Block a user