2016-05-02 22:25:35 +02:00
---
layout: "vsphere"
page_title: "VMware vSphere: vsphere_file"
sidebar_current: "docs-vsphere-resource-file"
description: |-
2016-05-20 00:25:47 +02:00
Provides a VMware vSphere virtual machine file resource. This can be used to upload files (e.g. vmdk disks) from the Terraform host machine to a remote vSphere.
---
2016-05-02 22:25:35 +02:00
# vsphere\_file
2016-05-20 00:25:47 +02:00
Provides a VMware vSphere virtual machine file resource. This can be used to upload files (e.g. vmdk disks) from the Terraform host machine to a remote vSphere.
2016-05-02 22:25:35 +02:00
## Example Usage
```
resource "vsphere_file" "ubuntu_disk" {
datastore = "local"
source_file = "/home/ubuntu/my_disks/custom_ubuntu.vmdk"
destination_file = "/my_path/disks/custom_ubuntu.vmdk"
}
```
## Argument Reference
The following arguments are supported:
2016-05-20 00:25:47 +02:00
* `source_file` - (Required) The path to the file on the Terraform host that will be uploaded to vSphere.
2016-05-02 22:25:35 +02:00
* `destination_file` - (Required) The path to where the file should be uploaded to on vSphere.
* `datacenter` - (Optional) The name of a Datacenter in which the file will be created/uploaded to.
* `datastore` - (Required) The name of the Datastore in which to create/upload the file to.