Skip to content

Latest commit

 

History

History
122 lines (99 loc) · 4 KB

.header.md

File metadata and controls

122 lines (99 loc) · 4 KB

vSphere Content Library Terraform Module

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.

Usage

Create a new 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
}

Create a new content library with an item

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"
    },
  ]
}

Create a new item in an existing content library

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"
    },
  ]
}

Import existing items from an existing content library

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"
    },
  ]
}

Create a publisher content library

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
}

Create a subscriber content library

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
}