Standardize label validation in JSON schemas to conform with GCP platform limits (#4021)

Co-authored-by: Ludovico Magnocavallo <ludomagno@google.com>
This commit is contained in:
Simone Ruffilli
2026-06-11 12:56:45 +02:00
committed by GitHub
parent 8adb84c95c
commit d57c79ac92
51 changed files with 377 additions and 207 deletions

View File

@@ -19,8 +19,12 @@
"labels": {
"type": "object",
"description": "User-defined labels.",
"additionalProperties": {
"type": "string"
"additionalProperties": false,
"patternProperties": {
"^[a-z][a-z0-9_-]{0,62}$": {
"type": "string",
"pattern": "^[a-z0-9_-]{0,63}$"
}
}
},
"ip_cidr_range": {

View File

@@ -9,7 +9,9 @@
- **name**: *string*
- **description**: *string*
- **labels**: *object*
<br>*additional properties: string*
<br>*additional properties: false*
- **`^[a-z][a-z0-9_-]{0,62}$`**: *string*
<br>*pattern: ^[a-z0-9_-]{0,63}$*
- **ip_cidr_range**: *string*
- ⁺**usage**: *string*
<br>*enum: ['FOR_VPC', 'EXTERNAL_TO_VPC', 'FOR_MIGRATION']*