Skip to content

Commit

Permalink
redis_firewall_rule: simplify regex in firewall rule name (#2911)
Browse files Browse the repository at this point in the history
This PR simplifies the regex in redis firewall rule name (original merged pr is #2906 )
  • Loading branch information
ghostinthewires authored and katbyte committed Feb 19, 2019
1 parent 5b7740c commit 2c51155
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion azurerm/resource_arm_redis_firewall_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func resourceArmRedisFirewallRuleDelete(d *schema.ResourceData, meta interface{}
func validateRedisFirewallRuleName(v interface{}, k string) (warnings []string, errors []error) {
value := v.(string)

if matched := regexp.MustCompile(`^[0-9a-zA-Z_]+$`).Match([]byte(value)); !matched {
if matched := regexp.MustCompile(`^\w+$`).Match([]byte(value)); !matched {
errors = append(errors, fmt.Errorf("%q may only contain alphanumeric characters and underscores", k))
}

Expand Down

0 comments on commit 2c51155

Please sign in to comment.