Skip to content
Open
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
5 changes: 5 additions & 0 deletions mmv1/products/compute/TargetTcpProxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ examples:
backend_service_name: 'backend-service'
health_check_name: 'health-check'
- name: target_tcp_proxy_backendless
min_version: beta
primary_resource_id: default
vars:
target_tcp_proxy_name: test-proxy
- name: target_tcp_proxy_tls_route
min_version: beta
primary_resource_id: default
vars:
Expand Down
8 changes: 8 additions & 0 deletions mmv1/products/networkservices/TlsRoute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ examples:
resource_name: 'my-tls-route'
backend_service_name: 'my-backend-service'
http_health_check_name: 'backend-service-health-check'
- name: 'network_services_tls_route_target_tcp_proxy_basic'
min_version: beta
primary_resource_id: 'default'
vars:
resource_name: 'my-tls-route'
target_tcp_proxy_name: 'my-target-tcp-proxy'
backend_service_name: 'my-backend-service'
health_check_name: 'my-health-check'
- name: 'network_services_tls_route_region_target_tcp_proxy_basic'
min_version: beta
primary_resource_id: 'default'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
resource "google_compute_backend_service" "{{$.PrimaryResourceId}}" {
provider = google-beta
name = "{{index $.Vars "backend_service_name"}}"
load_balancing_scheme = "INTERNAL_MANAGED"
protocol = "TCP"
health_checks = [google_compute_health_check.{{$.PrimaryResourceId}}.id]
}

resource "google_compute_health_check" "{{$.PrimaryResourceId}}" {
provider = google-beta
name = "{{index $.Vars "health_check_name"}}"

https_health_check {
port = 443
}
}

resource "google_compute_target_tcp_proxy" "{{$.PrimaryResourceId}}" {
provider = google-beta
name = "{{index $.Vars "target_tcp_proxy_name"}}"
load_balancing_scheme = "INTERNAL_MANAGED"
}

resource "google_network_services_tls_route" "{{$.PrimaryResourceId}}" {
provider = google-beta
name = "{{index $.Vars "resource_name"}}"

target_proxies = [
google_compute_target_tcp_proxy.{{$.PrimaryResourceId}}.id
]

rules {
matches {
sni_host = ["example.com"]
}
action {
destinations {
service_name = google_compute_backend_service.{{$.PrimaryResourceId}}.id
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
resource "google_compute_target_tcp_proxy" "{{$.PrimaryResourceId}}" {
provider = google-beta
name = "{{index $.Vars "target_tcp_proxy_name"}}"
load_balancing_scheme = "INTERNAL_MANAGED"
}

resource "google_compute_backend_service" "{{$.PrimaryResourceId}}" {
provider = google-beta
name = "{{index $.Vars "backend_service_name"}}"
load_balancing_scheme = "INTERNAL_MANAGED"
protocol = "TCP"
health_checks = [google_compute_health_check.{{$.PrimaryResourceId}}.id]
}

resource "google_compute_health_check" "{{$.PrimaryResourceId}}" {
provider = google-beta
name = "{{index $.Vars "health_check_name"}}"

https_health_check {
port = 443
}
}

resource "google_network_services_tls_route" "{{$.PrimaryResourceId}}" {
provider = google-beta
name = "{{index $.Vars "tls_route_name"}}"

target_proxies = [
google_compute_target_tcp_proxy.{{$.PrimaryResourceId}}.id
]

rules {
matches {
sni_host = ["example.com"]
}
action {
destinations {
service_name = google_compute_backend_service.{{$.PrimaryResourceId}}.id
}
}
}
}
Loading