-
Notifications
You must be signed in to change notification settings - Fork 523
/
compute_target_grpc_proxy.go
61 lines (58 loc) 路 2.13 KB
/
compute_target_grpc_proxy.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package google
import (
"github.com/infracost/infracost/internal/resources/google"
"github.com/infracost/infracost/internal/schema"
)
func getComputeTargetGRPCProxyRegistryItem() *schema.RegistryItem {
return &schema.RegistryItem{
Name: "google_compute_target_grpc_proxy",
CoreRFunc: NewComputeTargetGRPCProxy,
Notes: []string{"Price for additional forwarding rule is used"},
}
}
func getComputeTargetHTTPProxyRegistryItem() *schema.RegistryItem {
return &schema.RegistryItem{
Name: "google_compute_target_http_proxy",
CoreRFunc: NewComputeTargetGRPCProxy,
Notes: []string{"Price for additional forwarding rule is used"},
}
}
func getComputeTargetHTTPSProxyRegistryItem() *schema.RegistryItem {
return &schema.RegistryItem{
Name: "google_compute_target_https_proxy",
CoreRFunc: NewComputeTargetGRPCProxy,
Notes: []string{"Price for additional forwarding rule is used"},
}
}
func getComputeTargetSSLProxyRegistryItem() *schema.RegistryItem {
return &schema.RegistryItem{
Name: "google_compute_target_ssl_proxy",
CoreRFunc: NewComputeTargetGRPCProxy,
Notes: []string{"Price for additional forwarding rule is used"},
}
}
func getComputeTargetTCPProxyRegistryItem() *schema.RegistryItem {
return &schema.RegistryItem{
Name: "google_compute_target_tcp_proxy",
CoreRFunc: NewComputeTargetGRPCProxy,
Notes: []string{"Price for additional forwarding rule is used"},
}
}
func getComputeRegionTargetHTTPProxyRegistryItem() *schema.RegistryItem {
return &schema.RegistryItem{
Name: "google_compute_region_target_http_proxy",
CoreRFunc: NewComputeTargetGRPCProxy,
Notes: []string{"Price for additional forwarding rule is used"},
}
}
func getComputeRegionTargetHTTPSProxyRegistryItem() *schema.RegistryItem {
return &schema.RegistryItem{
Name: "google_compute_region_target_https_proxy",
CoreRFunc: NewComputeTargetGRPCProxy,
Notes: []string{"Price for additional forwarding rule is used"},
}
}
func NewComputeTargetGRPCProxy(d *schema.ResourceData) schema.CoreResource {
r := &google.ComputeTargetGRPCProxy{Address: d.Address, Region: d.Get("region").String()}
return r
}