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

azurerm_function_app_function - update function app function naming restrictions #22519

Merged
merged 3 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ func FunctionAppFunctionName(input interface{}, key string) (warnings []string,
return
}

if matched := regexp.MustCompile(`^[0-9a-zA-Z](([0-9a-zA-Z-]{0,126})[0-9a-zA-Z])?$`).Match([]byte(v)); !matched {
errors = append(errors, fmt.Errorf("%q must start with a letter, may only contain alphanumeric characters and dashes and up to 128 characters in length", key))
if matched := regexp.MustCompile(`^[0-9a-zA-Z](([-_0-9a-zA-Z-]{0,126})[-_0-9a-zA-Z])?$`).Match([]byte(v)); !matched {
errors = append(errors, fmt.Errorf("%q must start with a letter, may only contain alphanumeric characters, dashes, underscore and up to 128 characters in length", key))
}

return warnings, errors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestFunctionAppFunctionName(t *testing.T) {
},
{
Input: "EndsInWrongChar-",
Valid: false,
Valid: true,
},
}

Expand Down