Skip to content

Commit b67c65b

Browse files
committed
updated regex for network and subnetwork based on codeassist comment
1 parent 3aee13f commit b67c65b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

modules/gke-autopilot-cluster/metadata.display.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ spec:
316316
network:
317317
name: network
318318
title: Network
319-
regexValidation: ^[a-z][a-z0-9-]{0,60}[a-z0-9]$
319+
regexValidation: ^[a-z]([a-z0-9-]{0,60}[a-z0-9])?$
320320
validation: Network name must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens and cannot end with a hyphen.
321321
altDefaults:
322322
- type: ALTERNATE_TYPE_DC
@@ -471,7 +471,7 @@ spec:
471471
subnetwork:
472472
name: subnetwork
473473
title: Subnetwork
474-
regexValidation: ^[a-z][a-z0-9-]{0,60}[a-z0-9]$
474+
regexValidation: ^[a-z]([a-z0-9-]{0,60}[a-z0-9])?$
475475
validation: Network name must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens and cannot end with a hyphen.
476476
altDefaults:
477477
- type: ALTERNATE_TYPE_DC

modules/gke-standard-cluster/metadata.display.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ spec:
416416
network:
417417
name: network
418418
title: Network
419-
regexValidation: ^[a-z][a-z0-9-]{0,60}[a-z0-9]$
419+
regexValidation: ^[a-z]([a-z0-9-]{0,60}[a-z0-9])?$
420420
validation: Network name must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens and cannot end with a hyphen.
421421
altDefaults:
422422
- type: ALTERNATE_TYPE_DC
@@ -992,7 +992,7 @@ spec:
992992
subnetwork:
993993
name: subnetwork
994994
title: Subnetwork
995-
regexValidation: ^[a-z][a-z0-9-]{0,60}[a-z0-9]$
995+
regexValidation: ^[a-z]([a-z0-9-]{0,60}[a-z0-9])?$
996996
validation: Network name must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens and cannot end with a hyphen.
997997
altDefaults:
998998
- type: ALTERNATE_TYPE_DC

0 commit comments

Comments
 (0)