File tree Expand file tree Collapse file tree
templates/terraform/examples Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,6 +47,26 @@ examples:
4747 target_tcp_proxy_name : ' test-proxy'
4848 backend_service_name : ' backend-service'
4949 health_check_name : ' health-check'
50+ - name : ' target_tcp_proxy_basic_beta'
51+ min_version : beta
52+ primary_resource_id : ' default'
53+ vars :
54+ target_tcp_proxy_name : ' test-proxy'
55+ backend_service_name : ' backend-service'
56+ health_check_name : ' health-check'
57+ - name : target_tcp_proxy_backendless
58+ min_version : beta
59+ primary_resource_id : default
60+ vars :
61+ target_tcp_proxy_name : test-proxy
62+ - name : target_tcp_proxy_tls_route
63+ min_version : beta
64+ primary_resource_id : default
65+ vars :
66+ target_tcp_proxy_name : test-proxy
67+ backend_service_name : ' backend-service'
68+ health_check_name : ' health-check'
69+ tls_route_name : ' tls-route-check'
5070parameters :
5171properties :
5272 - name : ' creationTimestamp'
Original file line number Diff line number Diff line change @@ -62,6 +62,14 @@ examples:
6262 resource_name : ' my-tls-route'
6363 backend_service_name : ' my-backend-service'
6464 http_health_check_name : ' backend-service-health-check'
65+ - name : ' network_services_tls_route_target_tcp_proxy_basic'
66+ min_version : beta
67+ primary_resource_id : ' default'
68+ vars :
69+ resource_name : ' my-tls-route'
70+ target_tcp_proxy_name : ' my-target-tcp-proxy'
71+ backend_service_name : ' my-backend-service'
72+ health_check_name : ' my-health-check'
6573parameters :
6674 - name : ' name'
6775 type : String
@@ -107,6 +115,14 @@ properties:
107115 send_empty_value : true
108116 item_type :
109117 type : String
118+ - name : ' targetProxies'
119+ type : Array
120+ description : |
121+ TargetProxies defines a list of target proxies this TlsRoute is attached to, as one of the routing rules to route the requests served by the load balancer.
122+ Each target proxy reference should match the pattern: projects/*/locations/global/targetTcpProxies/<target_tcp_proxy_name>
123+ send_empty_value : true
124+ item_type :
125+ type : String
110126 - name : ' rules'
111127 type : Array
112128 description : |
Original file line number Diff line number Diff line change 1+ resource " google_compute_backend_service" " {{$.PrimaryResourceId}}" {
2+ provider = google-beta
3+ name = " {{index $.Vars " backend_service_name" }}"
4+ load_balancing_scheme = " INTERNAL_MANAGED"
5+ protocol = " TCP"
6+ health_checks = [google_compute_health_check. {{$ .PrimaryResourceId }}.id ]
7+ }
8+
9+ resource " google_compute_health_check" " {{$.PrimaryResourceId}}" {
10+ provider = google-beta
11+ name = " {{index $.Vars " health_check_name" }}"
12+
13+ https_health_check {
14+ port = 443
15+ }
16+ }
17+
18+ resource " google_compute_target_tcp_proxy" " {{$.PrimaryResourceId}}" {
19+ provider = google-beta
20+ name = " {{index $.Vars " target_tcp_proxy_name" }}"
21+ load_balancing_scheme = " INTERNAL_MANAGED"
22+ }
23+
24+ resource " google_network_services_tls_route" " {{$.PrimaryResourceId}}" {
25+ provider = google-beta
26+ name = " {{index $.Vars " resource_name" }}"
27+
28+ target_proxies = [
29+ google_compute_target_tcp_proxy. {{$ .PrimaryResourceId }}.id
30+ ]
31+
32+ rules {
33+ matches {
34+ sni_host = [" example.com" ]
35+ }
36+ action {
37+ destinations {
38+ service_name = google_compute_backend_service. {{$ .PrimaryResourceId }}.id
39+ }
40+ }
41+ }
42+ }
Original file line number Diff line number Diff line change 1+ resource " google_compute_target_tcp_proxy" " {{$.PrimaryResourceId}}" {
2+ provider = google-beta
3+ name = " {{index $.Vars " target_tcp_proxy_name" }}"
4+ load_balancing_scheme = " INTERNAL_MANAGED"
5+ }
6+
7+ resource " google_compute_backend_service" " {{$.PrimaryResourceId}}" {
8+ provider = google-beta
9+ name = " {{index $.Vars " backend_service_name" }}"
10+ load_balancing_scheme = " INTERNAL_MANAGED"
11+ protocol = " TCP"
12+ health_checks = [google_compute_health_check. {{$ .PrimaryResourceId }}.id ]
13+ }
14+
15+ resource " google_compute_health_check" " {{$.PrimaryResourceId}}" {
16+ provider = google-beta
17+ name = " {{index $.Vars " health_check_name" }}"
18+
19+ https_health_check {
20+ port = 443
21+ }
22+ }
23+
24+ resource " google_network_services_tls_route" " {{$.PrimaryResourceId}}" {
25+ provider = google-beta
26+ name = " {{index $.Vars " tls_route_name" }}"
27+
28+ target_proxies = [
29+ google_compute_target_tcp_proxy. {{$ .PrimaryResourceId }}.id
30+ ]
31+
32+ rules {
33+ matches {
34+ sni_host = [" example.com" ]
35+ }
36+ action {
37+ destinations {
38+ service_name = google_compute_backend_service. {{$ .PrimaryResourceId }}.id
39+ }
40+ }
41+ }
42+ }
You can’t perform that action at this time.
0 commit comments