Skip to content

Commit

Permalink
Revert "remove the regex match in log search name"
Browse files Browse the repository at this point in the history
This reverts commit b850a76.
  • Loading branch information
ssharma-sumologic committed Sep 24, 2024
1 parent b850a76 commit e88fcd8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sumologic/resource_sumologic_log_search.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
package sumologic

import (
"fmt"
"log"
"regexp"

"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
)

func resourceSumologicLogSearch() *schema.Resource {

nameRegex := `^[a-zA-Z0-9 +%\-@.,_()]+$`

return &schema.Resource{
Create: resourceSumologicLogSearchCreate,
Read: resourceSumologicLogSearchRead,
Expand All @@ -24,6 +28,7 @@ func resourceSumologicLogSearch() *schema.Resource {
Required: true,
ValidateFunc: validation.All(
validation.StringLenBetween(1, 255),
validation.StringMatch(regexp.MustCompile(nameRegex), fmt.Sprintf("Must match regex %s", nameRegex)),
),
},
"description": {
Expand Down

0 comments on commit e88fcd8

Please sign in to comment.