Skip to content

Commit

Permalink
add a simple validation for name of nsg rule (#22336)
Browse files Browse the repository at this point in the history
  • Loading branch information
wuxu92 authored Jun 30, 2023
1 parent f0217f4 commit 183f042
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/services/network/network_security_rule_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ func resourceNetworkSecurityRule() *pluginsdk.Resource {

Schema: map[string]*pluginsdk.Schema{
"name": {
Type: pluginsdk.TypeString,
Required: true,
ForceNew: true,
Type: pluginsdk.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validation.StringDoesNotContainAny("/\\?%"),
},

"resource_group_name": commonschema.ResourceGroupName(),
Expand Down

0 comments on commit 183f042

Please sign in to comment.