Skip to main content
Version: v1.6

VMware vSphere File Storage

Description

The vsphere-file resource can be used to upload files (such as ISOs and virtual disk files) from the host machine that Terraform is running on to a datastore.

Examples

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: vsphere-test-file
spec:
components:
- name: file-comp
type: vsphere-file
properties:
datacenter: dc-01
datastore: datastore-01
source_file: /my/src/path/custom_ubuntu.vmdk
destination_file: /my/dst/path/custom_ubuntu.vmdk
create_directories: true

Specification

Properties

NameDescriptionTypeRequiredDefault
create_directoriesCreate directories in destination_file path parameter on first apply if any are missing for copy operation.boolfalse
datacenterThe name of a datacenter to which the file will be uploaded.stringfalse
datastoreThe name of the datastore to which to upload the file.stringfalse
destination_fileThe path to where the file should be uploaded or copied to on the destination datastore in vSphere.stringfalse
source_datacenterThe name of a datacenter from which the file will be copied.stringfalse
source_datastoreThe name of the datastore from which file will be copied.stringfalse
source_fileThe path to the file being uploaded from the Terraform host to the vSphere environment or copied within vSphere environment.stringfalse
writeConnectionSecretToRefThe secret which the cloud resource connection will be written to.writeConnectionSecretToReffalse

writeConnectionSecretToRef

NameDescriptionTypeRequiredDefault
nameThe secret name which the cloud resource connection will be written to.stringtrue
namespaceThe secret namespace which the cloud resource connection will be written to.stringfalse

Outputs

If writeConnectionSecretToRef is set, a secret will be generated with these keys as below:

NameDescription
DATACENTOR
DATASTORE