Skip to main content
版本:v1.6

VMware vSphere File Storage

描述

vSphere file 资源可以用来从 Terraform 运行的主机上传文件(如 ISO 和虚拟磁盘文件)到 vSphere datastore。

示例

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

参数说明

属性

名称描述类型是否必须默认值
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

名称描述类型是否必须默认值
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

输出

如果设置了 writeConnectionSecretToRef,一个 Kubernetes Secret 将会被创建,并且,它的数据里有这些键(key):

名称描述
DATACENTOR
DATASTORE