You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for Network Endpoint Group to use serverlessDeployment for API Gateway (#5434) (#4041)
* initial creation of google-beta file .erb file for network endpoint groups
* Add support for serverless Network Endpoint Groups to use property serverlessDeployment
* Update serverless_deployment fields to accurately represent current state, which only provides support for API Gateway
* Added tests
* update files to autogenerate serverlessDeployment option for Network Endpoint Groups
* Remove manually created resource_compute_network_endpoint_group file so it can be autogenerated
* Add tag to mark serverlessDeployment to be available only via beta client
* Rename test file to allow for embedded ruby
* New tests should be in a resource_compute_region_network_endpoint_group_test.go.erb file, not resource_compute_network_endpoint_group_test.go.erb
* Use Cloud Run resources based off of auto-generated unit tests
* Spin up a new API Gateway resource to connect with Serverless NEG
* Remove requirement to provide resource field, and update url_mask to use <gateway> label to specify >1 endpoints
* Fix url_mask to parse out intended endpoint from gateway
* typo fix
* Conditional imports for beta usage
* Update naming conventions used in test
* update api config name
Signed-off-by: Modular Magician <[email protected]>
Description: `Type of network endpoints in this network endpoint group. Defaults to SERVERLESS Default value: "SERVERLESS" Possible values: ["SERVERLESS"]`,
197
197
Default: "SERVERLESS",
198
198
},
199
+
"serverless_deployment": {
200
+
Type: schema.TypeList,
201
+
Optional: true,
202
+
ForceNew: true,
203
+
Description: `Only valid when networkEndpointType is "SERVERLESS".
204
+
Only one of cloudRun, appEngine, cloudFunction or serverlessDeployment may be set.`,
205
+
MaxItems: 1,
206
+
Elem: &schema.Resource{
207
+
Schema: map[string]*schema.Schema{
208
+
"platform": {
209
+
Type: schema.TypeString,
210
+
Required: true,
211
+
ForceNew: true,
212
+
Description: `The platform of the NEG backend target(s). Possible values:
213
+
API Gateway: apigateway.googleapis.com`,
214
+
},
215
+
"url_mask": {
216
+
Type: schema.TypeString,
217
+
Required: true,
218
+
ForceNew: true,
219
+
Description: `A template to parse platform-specific fields from a request URL. URL mask allows for routing to multiple resources
220
+
on the same serverless platform without having to create multiple Network Endpoint Groups and backend resources.
221
+
The fields parsed by this template are platform-specific and are as follows: API Gateway: The gateway ID,
222
+
App Engine: The service and version, Cloud Functions: The function name, Cloud Run: The service and tag`,
223
+
},
224
+
"resource": {
225
+
Type: schema.TypeString,
226
+
Optional: true,
227
+
ForceNew: true,
228
+
Description: `The user-defined name of the workload/instance. This value must be provided explicitly or in the urlMask.
229
+
The resource identified by this value is platform-specific and is as follows: API Gateway: The gateway ID, App Engine: The service name,
230
+
Cloud Functions: The function name, Cloud Run: The service name`,
231
+
},
232
+
"version": {
233
+
Type: schema.TypeString,
234
+
Optional: true,
235
+
ForceNew: true,
236
+
Description: `The optional resource version. The version identified by this value is platform-specific and is follows:
237
+
API Gateway: Unused, App Engine: The service version, Cloud Functions: Unused, Cloud Run: The service tag`,
0 commit comments