back
terraform {
required_providers {
vsphere = ">= 1.25.0"
}
}
top
module "vsphere_file" {
source = "./modules/vsphere/r/vsphere_file"
# create_directories - (optional) is a type of bool
create_directories = null
# datacenter - (optional) is a type of string
datacenter = null
# datastore - (required) is a type of string
datastore = null
# destination_file - (required) is a type of string
destination_file = null
# source_datacenter - (optional) is a type of string
source_datacenter = null
# source_datastore - (optional) is a type of string
source_datastore = null
# source_file - (required) is a type of string
source_file = null
}
top
variable "create_directories" {
description = "(optional)"
type = bool
default = null
}
variable "datacenter" {
description = "(optional)"
type = string
default = null
}
variable "datastore" {
description = "(required)"
type = string
}
variable "destination_file" {
description = "(required)"
type = string
}
variable "source_datacenter" {
description = "(optional)"
type = string
default = null
}
variable "source_datastore" {
description = "(optional)"
type = string
default = null
}
variable "source_file" {
description = "(required)"
type = string
}
top
resource "vsphere_file" "this" {
# create_directories - (optional) is a type of bool
create_directories = var.create_directories
# datacenter - (optional) is a type of string
datacenter = var.datacenter
# datastore - (required) is a type of string
datastore = var.datastore
# destination_file - (required) is a type of string
destination_file = var.destination_file
# source_datacenter - (optional) is a type of string
source_datacenter = var.source_datacenter
# source_datastore - (optional) is a type of string
source_datastore = var.source_datastore
# source_file - (required) is a type of string
source_file = var.source_file
}
top
output "id" {
description = "returns a string"
value = vsphere_file.this.id
}
output "this" {
value = vsphere_file.this
}
top