Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release TargetHttpProxy resource in Terraform #119

Merged
merged 2 commits into from
Apr 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/terraform
8 changes: 8 additions & 0 deletions products/compute/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2589,10 +2589,18 @@ objects:
name: 'TargetHttpProxy'
kind: 'compute#targetHttpProxy'
base_url: projects/{{project}}/global/targetHttpProxies
exports:
- !ruby/object:Api::Type::SelfLink
name: 'selfLink'
input: true
description: |
Represents a TargetHttpProxy resource, which is used by one or more global
forwarding rule to route incoming HTTP requests to a URL map.
references: !ruby/object:Api::Resource::ReferenceLinks
guides:
'Official Documentation':
'https://cloud.google.com/compute/docs/load-balancing/http/target-proxies'
api: 'https://cloud.google.com/compute/docs/reference/latest/targetHttpProxies'
<%= indent(compile_file({}, 'templates/global_async.yaml.erb'), 4) %>
properties:
- !ruby/object:Api::Type::Time
Expand Down
47 changes: 46 additions & 1 deletion products/compute/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,52 @@ overrides: !ruby/object:Provider::ResourceOverrides
validation: !ruby/object:Provider::Terraform::Validation
function: 'validateIpCidrRange'
TargetHttpProxy: !ruby/object:Provider::Terraform::ResourceOverride
exclude: true
examples: |
```hcl
resource "google_compute_target_http_proxy" "default" {
name = "test-proxy"
description = "a description"
url_map = "${google_compute_url_map.default.self_link}"
}

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 {
name = "allpaths"
default_service = "${google_compute_backend_service.default.self_link}"

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

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
}
```
properties:
id: !ruby/object:Provider::Terraform::PropertyOverride
name: proxyId
Expand Down