-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
provider_handwritten_endpoint.go
144 lines (128 loc) · 5.03 KB
/
provider_handwritten_endpoint.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
package google
import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
// For generated resources, endpoint entries live in product-specific provider
// files. Collect handwritten ones here. If any of these are modified, be sure
// to update the provider_reference docs page.
var CloudBillingCustomEndpointEntryKey = "cloud_billing_custom_endpoint"
var CloudBillingCustomEndpointEntry = &schema.Schema{
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_CLOUD_BILLING_CUSTOM_ENDPOINT",
}, DefaultBasePaths[CloudBillingBasePathKey]),
}
var ComposerCustomEndpointEntryKey = "composer_custom_endpoint"
var ComposerCustomEndpointEntry = &schema.Schema{
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_COMPOSER_CUSTOM_ENDPOINT",
}, DefaultBasePaths[ComposerBasePathKey]),
}
var ContainerCustomEndpointEntryKey = "container_custom_endpoint"
var ContainerCustomEndpointEntry = &schema.Schema{
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_CONTAINER_CUSTOM_ENDPOINT",
}, DefaultBasePaths[ContainerBasePathKey]),
}
var DataflowCustomEndpointEntryKey = "dataflow_custom_endpoint"
var DataflowCustomEndpointEntry = &schema.Schema{
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_DATAFLOW_CUSTOM_ENDPOINT",
}, DefaultBasePaths[DataflowBasePathKey]),
}
var IAMCustomEndpointEntryKey = "iam_custom_endpoint"
var IAMCustomEndpointEntry = &schema.Schema{
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_IAM_CUSTOM_ENDPOINT",
}, DefaultBasePaths[IAMBasePathKey]),
}
var IamCredentialsCustomEndpointEntryKey = "iam_credentials_custom_endpoint"
var IamCredentialsCustomEndpointEntry = &schema.Schema{
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_IAM_CREDENTIALS_CUSTOM_ENDPOINT",
}, DefaultBasePaths[IamCredentialsBasePathKey]),
}
var ResourceManagerV3CustomEndpointEntryKey = "resource_manager_v3_custom_endpoint"
var ResourceManagerV3CustomEndpointEntry = &schema.Schema{
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_RESOURCE_MANAGER_V3_CUSTOM_ENDPOINT",
}, DefaultBasePaths[ResourceManagerV3BasePathKey]),
}
var ServiceNetworkingCustomEndpointEntryKey = "service_networking_custom_endpoint"
var ServiceNetworkingCustomEndpointEntry = &schema.Schema{
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_SERVICE_NETWORKING_CUSTOM_ENDPOINT",
}, DefaultBasePaths[ServiceNetworkingBasePathKey]),
}
var ServiceUsageCustomEndpointEntryKey = "service_usage_custom_endpoint"
var ServiceUsageCustomEndpointEntry = &schema.Schema{
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_SERVICE_USAGE_CUSTOM_ENDPOINT",
}, DefaultBasePaths[ServiceUsageBasePathKey]),
}
var BigtableAdminCustomEndpointEntryKey = "bigtable_custom_endpoint"
var BigtableAdminCustomEndpointEntry = &schema.Schema{
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_BIGTABLE_CUSTOM_ENDPOINT",
}, DefaultBasePaths[BigtableAdminBasePathKey]),
}
var PrivatecaCertificateTemplateEndpointEntryKey = "privateca_custom_endpoint"
var PrivatecaCertificateTemplateCustomEndpointEntry = &schema.Schema{
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_PRIVATECA_CUSTOM_ENDPOINT",
}, DefaultBasePaths[PrivatecaBasePathKey]),
}
var ContainerAwsCustomEndpointEntryKey = "container_aws_custom_endpoint"
var ContainerAwsCustomEndpointEntry = &schema.Schema{
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_CONTAINERAWS_CUSTOM_ENDPOINT",
}, DefaultBasePaths[ContainerAwsBasePathKey]),
}
var ContainerAzureCustomEndpointEntryKey = "container_azure_custom_endpoint"
var ContainerAzureCustomEndpointEntry = &schema.Schema{
Type: schema.TypeString,
Optional: true,
ValidateFunc: validateCustomEndpoint,
DefaultFunc: schema.MultiEnvDefaultFunc([]string{
"GOOGLE_CONTAINERAZURE_CUSTOM_ENDPOINT",
}, DefaultBasePaths[ContainerAzureBasePathKey]),
}
func validateCustomEndpoint(v interface{}, k string) (ws []string, errors []error) {
re := `.*/[^/]+/$`
return validateRegexp(re)(v, k)
}