Skip to content

Commit

Permalink
Fix lxc container size: Accept K (#836)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mice7R authored Dec 6, 2023
1 parent 77f2240 commit eca98dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proxmox/resource_lxc.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func resourceLxc() *schema.Resource {
Optional: true,
ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) {
v := val.(string)
if !(strings.Contains(v, "T") || strings.Contains(v, "G") || strings.Contains(v, "M") || strings.Contains(v, "n")) {
if !(strings.Contains(v, "T") || strings.Contains(v, "G") || strings.Contains(v, "M") || strings.Contains(v, "K")) {
errs = append(errs, fmt.Errorf("disk size must end in T, G, M, or K, got %s", v))
}
return
Expand Down Expand Up @@ -359,7 +359,7 @@ func resourceLxc() *schema.Resource {
Required: true,
ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) {
v := val.(string)
if !(strings.Contains(v, "T") || strings.Contains(v, "G") || strings.Contains(v, "M") || strings.Contains(v, "n")) {
if !(strings.Contains(v, "T") || strings.Contains(v, "G") || strings.Contains(v, "M") || strings.Contains(v, "K")) {
errs = append(errs, fmt.Errorf("disk size must end in T, G, M, or K, got %s", v))
}
return
Expand Down

0 comments on commit eca98dc

Please sign in to comment.