Skip to content

Commit

Permalink
Merge pull request #2906 from RiverPhillips/master
Browse files Browse the repository at this point in the history
Update redux firewall rule name to allow underscores - resolves #2903
  • Loading branch information
tombuildsstuff authored Feb 18, 2019
2 parents 7f6e370 + a06784c commit 3c59117
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions azurerm/resource_arm_redis_firewall_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ 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 {
errors = append(errors, fmt.Errorf("%q may only contain alphanumeric characters", k))
if matched := regexp.MustCompile(`^[0-9a-zA-Z_]+$`).Match([]byte(value)); !matched {
errors = append(errors, fmt.Errorf("%q may only contain alphanumeric characters and underscores", k))
}

return warnings, errors
Expand Down
2 changes: 1 addition & 1 deletion azurerm/resource_arm_redis_firewall_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestAzureRMRedisFirewallRuleName_validation(t *testing.T) {
},
{
Value: "hello_world",
ErrCount: 1,
ErrCount: 0,
},
{
Value: "helloworld21!",
Expand Down

0 comments on commit 3c59117

Please sign in to comment.