Skip to content

Commit

Permalink
update per comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyeqf committed Nov 20, 2023
1 parent 6db2907 commit 24ff0e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,6 @@ resource "azurerm_application_load_balancer" "test" {

func (r ApplicationLoadBalancerResource) requiresImport(data acceptance.TestData) string {
return fmt.Sprintf(`
provider "azurerm" {
features {
}
}
%s
resource "azurerm_application_load_balancer" "import" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import (
)

func ApplicationLoadBalancerSubnetAssociationName() pluginsdk.SchemaValidateFunc {
return validation.StringMatch(regexp.MustCompile(`^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,62}[a-zA-Z0-9]$`),
"the name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens. The value must be 1-64 characters long.",
return validation.All(
validation.StringLenBetween(1, 64),
validation.StringMatch(regexp.MustCompile(`^[a-zA-Z0-9]`), "the name must begin with a letter or number."),
validation.StringMatch(regexp.MustCompile(`[a-zA-Z0-9]$`), "the name must end with a letter or number."),
validation.StringMatch(regexp.MustCompile(`[a-zA-Z0-9_.-]{0,64}`), "the name may contain only letters, numbers, underscores, periods, or hyphens."),
)
}

0 comments on commit 24ff0e0

Please sign in to comment.