Skip to content

Commit

Permalink
resource_vm_qemu: allow . (dot) in name of virtual machine (Telmate#886)
Browse files Browse the repository at this point in the history
  • Loading branch information
vilhelmprytz authored Dec 25, 2023
1 parent a8675d3 commit e51e787
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proxmox/resource_vm_qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ func resourceVmQemu() *schema.Resource {
Description: "The VM name",
ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) {
v := val.(string)
matched, err := regexp.Match("[^a-zA-Z0-9-]", []byte(v))
matched, err := regexp.Match("[^a-zA-Z0-9-.]", []byte(v))
if err != nil {
warns = append(warns, fmt.Sprintf("%q, had an error running regexp.Match err=[%v]", key, err))
}
if matched {
errs = append(errs, fmt.Errorf("%q, must be contain only alphanumerics and hyphens [%v]", key, v))
errs = append(errs, fmt.Errorf("%q, must only contain alphanumerics, hyphens and dots [%v]", key, v))
}
return
},
Expand Down

0 comments on commit e51e787

Please sign in to comment.