This Terraform module creates or imports a datastore‑backed content library in your VMware Cloud on AWS or VMware vSphere on‑premises environment. You can configure the content library as one of three types: standalone, publisher, or subscriber.
You can optionally specify a list of new items, such as OVA and ISO images, to deploy into the new or existing content library or a list of items to import from an existing content library.
module "vsphere_content_library" {
source = "aws-ia/content-library/vsphere"
version = ">= 1.0.0"
datacenter_name = "SDDC-Datacenter"
datastore_name = "WorkloadDatastore"
content_library_name = "example-content-library"
content_library_description = "Example content library."
create_content_library = true
}
module "vsphere_content_library" {
source = "aws-ia/content-library/vsphere"
version = ">= 1.0.0"
datacenter_name = "SDDC-Datacenter"
datastore_name = "WorkloadDatastore"
content_library_name = "example-content-library"
content_library_description = "Example content library."
create_content_library = true
create_content_library_items = true
content_library_items = [
{
name = "vmware-tools-windows-12.0.6-20"
description = "VMware Tools for Windows."
file_url = "https://packages.vmware.com/tools/esx/8.0/windows/VMware-tools-windows-12.0.6-20104755.iso"
type = "iso"
},
]
}
module "vsphere_content_library" {
source = "aws-ia/content-library/vsphere"
version = ">= 1.0.0"
content_library_name = "example-content-library"
create_content_library = false
create_content_library_items = true
content_library_items = [
{
name = "vmware-tools-windows-12.0.6-20"
description = "VMware Tools for Windows."
file_url = "https://packages.vmware.com/tools/esx/8.0/windows/VMware-tools-windows-12.0.6-20104755.iso"
type = "iso"
},
]
}
module "vsphere_content_library" {
source = "aws-ia/content-library/vsphere"
version = ">= 1.0.0"
content_library_name = "example-content-library"
create_content_library = false
create_content_library_items = false
content_library_items = [
{
name = "vmware-tools-windows-12.0.6-20"
description = ""
file_url = "n/a"
type = "iso"
},
]
}
module "vsphere_content_library" {
source = "aws-ia/content-library/vsphere"
version = ">= 1.0.0"
content_library_name = "example-publisher"
create_content_library = true
authentication_method = "BASIC"
password = var.password
publication_published = true
}
module "vsphere_content_library" {
source = "aws-ia/content-library/vsphere"
version = ">= 1.0.0"
content_library_name = "example-subscriber"
create_content_library = true
subscription_url = "https://vcenter.sddc-127-0-0-1.vmwarevmc.com:443/cls/vcsp/lib/60d8b31e-c6d0-47d7-9758-ff0f4ff5af14/lib.json"
authentication_method = "BASIC"
password = var.password
subscription_automatic_sync = true
subscription_on_demand = false
}