Skip to content

Commit 0e051af

Browse files
cloudrunv2: Validate number of ports specified restricting to 1. (#10173) (#17594)
* cloudrunv2: Validate number of ports specified restricting to 1. * Update mmv1/products/cloudrunv2/Service.yaml [upstream:219ab589aaafa919c7011967def03305f56c8462] Signed-off-by: Modular Magician <[email protected]>
1 parent fa60d89 commit 0e051af

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.changelog/10173.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
cloudrunv2: added the validation to restrict number of ports to 1 to fail earlier than server-side validation
3+
```

google/services/cloudrunv2/resource_cloud_run_v2_service.go

+1
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ is the value of container.ports[0].containerPort.`,
301301
Description: `List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible.
302302
303303
If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on`,
304+
MaxItems: 1,
304305
Elem: &schema.Resource{
305306
Schema: map[string]*schema.Schema{
306307
"container_port": {

0 commit comments

Comments
 (0)