diff --git a/azurerm/resource_arm_snapshot.go b/azurerm/resource_arm_snapshot.go index ce1579632fb8..1652acdf66a8 100644 --- a/azurerm/resource_arm_snapshot.go +++ b/azurerm/resource_arm_snapshot.go @@ -216,10 +216,10 @@ func resourceArmSnapshotDelete(d *schema.ResourceData, meta interface{}) error { } func validateSnapshotName(v interface{}, k string) (ws []string, errors []error) { - // a-z, A-Z, 0-9 and _. The max name length is 80 + // a-z, A-Z, 0-9, _ and -. The max name length is 80 value := v.(string) - r, _ := regexp.Compile("^[A-Za-z0-9_]+$") + r, _ := regexp.Compile("^[A-Za-z0-9_-]+$") if !r.MatchString(value) { errors = append(errors, fmt.Errorf("Snapshot Names can only contain alphanumeric characters and underscores.")) }