Skip to content

Commit 541d094

Browse files
authored
πŸ› fix org_id regex in space resource (#281)
* πŸ› fix org_id regex in space resource * 🧹 update error message to match regex Signed-off-by: Salim Afiune Maya <afiune@mondoo.com> --------- Signed-off-by: Salim Afiune Maya <afiune@mondoo.com>
1 parent dc55473 commit 541d094

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

β€Žinternal/provider/organization_resource.goβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (r *organizationResource) Schema(ctx context.Context, req resource.SchemaRe
6060
Validators: []validator.String{
6161
stringvalidator.RegexMatches(
6262
regexp.MustCompile(`^[a-z\d]([\d-_]|[a-z]){4,48}[a-z\d]$`),
63-
"must contain 4 to 50 digits, dashes, underscores, or lowercase letters, and ending with either a lowercase letter or a digit",
63+
"must contain 6 to 50 digits, dashes, underscores, or lowercase letters, and ending with either a lowercase letter or a digit",
6464
),
6565
},
6666
},

β€Žinternal/provider/space_resource.goβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ func (r *SpaceResource) Schema(ctx context.Context, req resource.SchemaRequest,
163163
Required: true,
164164
Validators: []validator.String{
165165
stringvalidator.RegexMatches(
166-
regexp.MustCompile(`^[a-z]([\d-_]|[a-z]){6,35}[a-z\d]$`),
167-
"must contain 6 to 35 digits, dashes, underscores, or lowercase letters, and ending with either a lowercase letter or a digit",
166+
regexp.MustCompile(`^[a-z\d]([\d-_]|[a-z]){4,48}[a-z\d]$`),
167+
"must contain 6 to 50 digits, dashes, underscores, or lowercase letters, and ending with either a lowercase letter or a digit",
168168
),
169169
},
170170
},

0 commit comments

Comments
Β (0)