Skip to content

Latest commit

 

History

History
147 lines (127 loc) · 6.84 KB

vsphere_cloud.md

File metadata and controls

147 lines (127 loc) · 6.84 KB
page_title subcategory description
morpheus_vsphere_cloud Resource - terraform-provider-morpheus
Provides a Morpheus cloud resource.

morpheus_vsphere_cloud

Provides a Morpheus cloud resource.

Example Usage

Creating the vSphere cloud with local credentials:

data "morpheus_tenant" "tf_example_tenant" {
  name = "Terraform Example Tenant"
}

resource "morpheus_vsphere_cloud" "tf_example_vsphere_cloud" {
  name                                    = "tf_example_vsphere_cloud"
  code                                    = "tfvsphere"
  location                                = "denver"
  visibility                              = "private"
  tenant_id                               = data.morpheus_tenant.tf_example_tenant.id
  enabled                                 = true
  automatically_power_on_vms              = true
  api_url                                 = "https://vcenter.morpheus.local/sdk"
  username                                = "administrator@vsphere.local"
  password                                = "password"
  api_version                             = "6.7"
  datacenter                              = "morpheusdc"
  cluster                                 = "morpheus-cluster"
  resource_pool                           = ""
  rpc_mode                                = "guestexec"
  hide_host_selection                     = true
  import_existing_vms                     = true
  enable_hypervisor_console               = true
  keyboard_layout                         = "us"
  enable_disk_type_selection              = true
  enable_storage_type_selection           = true
  enable_network_interface_type_selection = true
  storage_type                            = "thin"
  appliance_url                           = "https://demo.morpheusdata.com"
  time_zone                               = "America/Denver"
  datacenter_id                           = "12345"
  guidance                                = "manual"
  costing                                 = "costing"
  agent_install_mode                      = "cloudInit"
}

Creating the vSphere cloud with a credential store credential:

data "morpheus_tenant" "tf_example_tenant" {
  name = "Terraform Example Tenant"
}

data "morpheus_credential" "vsphere_credentials" {
  name = "vspheredemo"
}

resource "morpheus_vsphere_cloud" "tf_example_vsphere_cloud" {
  name                                    = "tf_example_vsphere_cloud"
  code                                    = "tfvsphere"
  location                                = "denver"
  visibility                              = "private"
  tenant_id                               = data.morpheus_tenant.tf_example_tenant.id
  enabled                                 = true
  automatically_power_on_vms              = true
  api_url                                 = "https://vcenter.morpheus.local/sdk"
  credential_id                           = data.morpheus_credential.vsphere_credentials.id
  api_version                             = "6.7"
  datacenter                              = "morpheusdc"
  cluster                                 = "morpheus-cluster"
  resource_pool                           = ""
  rpc_mode                                = "guestexec"
  hide_host_selection                     = true
  import_existing_vms                     = true
  enable_hypervisor_console               = true
  keyboard_layout                         = "us"
  enable_disk_type_selection              = true
  enable_storage_type_selection           = true
  enable_network_interface_type_selection = true
  storage_type                            = "thin"
  appliance_url                           = "https://demo.morpheusdata.com"
  time_zone                               = "America/Denver"
  datacenter_id                           = "12345"
  guidance                                = "manual"
  costing                                 = "costing"
  agent_install_mode                      = "cloudInit"
}

Schema

Required

Optional

  • agent_install_mode (String) The method used to install the Morpheus agent on virtual machines provisioned in the cloud (ssh, cloudInit)
  • appliance_url (String) The URL used by workloads provisioned in the cloud for interacting with the Morpheus appliance
  • automatically_power_on_vms (Boolean) Determines whether to automatically power on cloud virtual machines
  • cluster (String) The name of the vSphere cluster
  • code (String) Optional code for use with policies
  • config_management_integration_id (String) The id of the configuration management integration associated with the vSphere cloud
  • costing (String) Whether to enable costing on the cloud (off, costing)
  • credential_id (Number) The ID of the credential store entry used for authentication
  • datacenter_id (String) A custom id used to reference the datacenter for the cloud
  • enable_disk_type_selection (Boolean) Whether to enable the user to select the disk type during provisioning
  • enable_hypervisor_console (Boolean) Whether to enable VNC access
  • enable_network_interface_type_selection (Boolean) Whether to enable the user to select the network interface type during provisioning
  • enable_storage_type_selection (Boolean) Whether to enable the user to select the storage type during provisioning
  • enabled (Boolean) Determines whether the cloud is active or not
  • guidance (String) Whether to enable guidance recommendations on the cloud (manual, off)
  • hide_host_selection (Boolean) Whether to hide the ability to select the vSphere host from the user during provisioning
  • import_existing_vms (Boolean) Whether to import existing virtual machines
  • keyboard_layout (String) The keyboard layout
  • location (String) Optional location for your cloud
  • password (String, Sensitive) The password of the VMware vSphere account
  • resource_pool (String) The name of the vSphere resource pool
  • rpc_mode (String) The method for interacting with cloud workloads (guestexec (VMware Tools) or rpc (SSH/WinRM))
  • storage_type (String) The default vSphere VMDK type for virtual machines (thin, thick, thickEager)
  • tenant_id (String) The id of the morpheus tenant the cloud is assigned to
  • time_zone (String) The time zone for the cloud
  • username (String) The username of the VMware vSphere account
  • visibility (String) Determines whether the cloud is visible in sub-tenants or not

Read-Only

  • id (String) The ID of the cloud

Import

Import is supported using the following syntax:

terraform import morpheus_vsphere_cloud.tf_example_vsphere_cloud 1