Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update VM name and VMSS name validation rule - now names can end with upper case letters #7023

Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion azurerm/internal/services/compute/validation.go
Expand Up @@ -35,7 +35,7 @@ func ValidateVmName(i interface{}, k string) (warnings []string, errors []error)
errors = append(errors, fmt.Errorf("%q must begin with an alphanumeric character", k))
}

if matched := regexp.MustCompile(`[a-z0-9_]$`).Match([]byte(v)); !matched {
if matched := regexp.MustCompile(`\w$`).Match([]byte(v)); !matched {
ArcturusZhang marked this conversation as resolved.
Show resolved Hide resolved
errors = append(errors, fmt.Errorf("%q must end with an alphanumeric character or underscore", k))
}

Expand Down