import * as pulumi from "@pulumi/pulumi"; /** * 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. The resource can also be used to copy files between datastores, or * from one location to another on the same datastore. * * Updates to destination parameters such as `datacenter`, `datastore`, or * `destinationFile` will move the managed file a new destination based on the * values of the new settings. If any source parameter is changed, such as * `sourceDatastore`, `sourceDatacenter`, or `sourceFile`), the resource will * be re-created. Depending on if destination parameters are being changed, * this may result in the destination file either being overwritten or * deleted from the previous location. * * ## Example Usage * * ### S * * ### Uploading a File * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const ubuntuVmdkUpload = new vsphere.File("ubuntu_vmdk_upload", { * datacenter: "dc-01", * datastore: "datastore-01", * sourceFile: "/my/src/path/custom_ubuntu.vmdk", * destinationFile: "/my/dst/path/custom_ubuntu.vmdk", * createDirectories: true, * }); * ``` * * ### Copying a File * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const ubuntuCopy = new vsphere.File("ubuntu_copy", { * sourceDatacenter: "dc-01", * datacenter: "dc-01", * sourceDatastore: "datastore-01", * datastore: "datastore-01", * sourceFile: "/my/src/path/custom_ubuntu.vmdk", * destinationFile: "/my/dst/path/custom_ubuntu.vmdk", * createDirectories: true, * }); * ``` */ export declare class File extends pulumi.CustomResource { /** * Get an existing File resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: FileState, opts?: pulumi.CustomResourceOptions): File; /** * Returns true if the given object is an instance of File. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is File; /** * Specifies whether to create the parent directories of the destination file if they do not exist. */ readonly createDirectories: pulumi.Output; /** * The name of a datacenter to which the file will be * uploaded. */ readonly datacenter: pulumi.Output; /** * The name of the datastore to which to upload the * file. */ readonly datastore: pulumi.Output; /** * The path to where the file should be uploaded * or copied to on the destination datastore. */ readonly destinationFile: pulumi.Output; /** * The name of a datacenter from which the file * will be copied. Forces a new resource if changed. */ readonly sourceDatacenter: pulumi.Output; /** * The name of the datastore from which file will * be copied. Forces a new resource if changed. */ readonly sourceDatastore: pulumi.Output; /** * The path to the file being uploaded from or copied. * Forces a new resource if changed. */ readonly sourceFile: pulumi.Output; /** * Create a File resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: FileArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering File resources. */ export interface FileState { /** * Specifies whether to create the parent directories of the destination file if they do not exist. */ createDirectories?: pulumi.Input; /** * The name of a datacenter to which the file will be * uploaded. */ datacenter?: pulumi.Input; /** * The name of the datastore to which to upload the * file. */ datastore?: pulumi.Input; /** * The path to where the file should be uploaded * or copied to on the destination datastore. */ destinationFile?: pulumi.Input; /** * The name of a datacenter from which the file * will be copied. Forces a new resource if changed. */ sourceDatacenter?: pulumi.Input; /** * The name of the datastore from which file will * be copied. Forces a new resource if changed. */ sourceDatastore?: pulumi.Input; /** * The path to the file being uploaded from or copied. * Forces a new resource if changed. */ sourceFile?: pulumi.Input; } /** * The set of arguments for constructing a File resource. */ export interface FileArgs { /** * Specifies whether to create the parent directories of the destination file if they do not exist. */ createDirectories?: pulumi.Input; /** * The name of a datacenter to which the file will be * uploaded. */ datacenter?: pulumi.Input; /** * The name of the datastore to which to upload the * file. */ datastore: pulumi.Input; /** * The path to where the file should be uploaded * or copied to on the destination datastore. */ destinationFile: pulumi.Input; /** * The name of a datacenter from which the file * will be copied. Forces a new resource if changed. */ sourceDatacenter?: pulumi.Input; /** * The name of the datastore from which file will * be copied. Forces a new resource if changed. */ sourceDatastore?: pulumi.Input; /** * The path to the file being uploaded from or copied. * Forces a new resource if changed. */ sourceFile: pulumi.Input; }