diff --git a/vsphere/resource_vsphere_virtual_disk.go b/vsphere/resource_vsphere_virtual_disk.go index 7463b3c8e..a6fd4c5d3 100644 --- a/vsphere/resource_vsphere_virtual_disk.go +++ b/vsphere/resource_vsphere_virtual_disk.go @@ -51,6 +51,12 @@ func resourceVSphereVirtualDisk() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, + ValidateFunc: func(v interface{}, k string) (warns []string, errors []error) { + if !strings.HasSuffix(v.(string), ".vmdk") { + errors = append(errors, fmt.Errorf("vmdk_path must end with '.vmdk'")) + } + return + }, }, "datastore": {