Fix volume name validation (#400)
PR #386 introduced validation of volume names that disallows dashes, which is allowed according to DigitalOcean's API documentation: https://developers.digitalocean.com/documentation/v2/#block-storage
This commit is contained in:
parent
8d10c8bd0d
commit
aa45e68626
|
@ -37,7 +37,7 @@ func resourceDigitalOceanVolume() *schema.Resource {
|
|||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
ForceNew: true,
|
||||
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-z0-9]+$`), "Names must be lowercase and alphanumeric"),
|
||||
ValidateFunc: validation.StringMatch(regexp.MustCompile(`^[a-z0-9\-]+$`), "Names must be lowercase and be composed only of numbers, letters and \"-\"."),
|
||||
},
|
||||
"urn": {
|
||||
Type: schema.TypeString,
|
||||
|
|
Loading…
Reference in New Issue