page_title | subcategory | description |
---|---|---|
morpheus_vsphere_instance Resource - terraform-provider-morpheus |
Provides a Morpheus instance resource. |
Provides a Morpheus instance resource.
data "morpheus_group" "morpheus_lab" {
name = "MORPHEUS"
}
data "morpheus_cloud" "morpheus_vsphere" {
name = "MORPHEUSVCENTER"
}
data "morpheus_resource_pool" "vsphere_resource_pool" {
name = "Morpheus-Cluster"
cloud_id = data.morpheus_cloud.morpheus_vsphere.id
}
data "morpheus_instance_type" "ubuntu" {
name = "Ubuntu"
}
data "morpheus_instance_layout" "ubuntu" {
name = "VMware VM"
version = "22.04"
}
data "morpheus_network" "vmnetwork" {
name = "VM Network"
}
data "morpheus_plan" "vmware" {
name = "1 CPU, 4GB Memory"
provision_type = "vmware"
}
resource "morpheus_vsphere_instance" "tf_example_vsphere_instance" {
name = "tfvsphere"
description = "Terraform instance example"
cloud_id = data.morpheus_cloud.morpheus_vsphere.id
group_id = data.morpheus_group.morpheus_lab.id
instance_type_id = data.morpheus_instance_type.ubuntu.id
instance_layout_id = data.morpheus_instance_layout.ubuntu.id
plan_id = data.morpheus_plan.vmware.id
environment = "dev"
resource_pool_id = data.morpheus_resource_pool.vsphere_resource_pool.id
labels = ["demo", "terraform"]
interfaces {
network_id = data.morpheus_network.vmnetwork.id
}
tags = {
name = "ubuntutf"
}
evar {
name = "application"
value = "demo"
export = true
masked = true
}
custom_options = {
vsphereDatacenter = "denver"
}
}
cloud_id
(Number) The ID of the cloud associated with the instancegroup_id
(Number) The ID of the group associated with the instanceinstance_layout_id
(Number) The layout to provision the instance frominstance_type_id
(Number) The type of instance to provisionplan_id
(Number) The service plan associated with the instance
asset_tag
(String) The asset tag associated with the instancecreate_user
(Boolean) Whether to create a user account on the instance that is associated with the provisioning user accountcustom_options
(Map of String) Custom options to pass to the instancedescription
(String) The user friendly description of the instancedomain_id
(Number) The ID of the network domain to provision the instance toenvironment
(String) The environment to assign the instance toevar
(Block List) The environment variables to create (see below for nested schema)interfaces
(Block List) The instance network interfaces to create (see below for nested schema)labels
(List of String) The list of labels to add to the instancename
(String) The name of the instancenested_virtualization
(Boolean) Whether to skip configuration of nested virtualizationresource_pool_id
(Number) The ID of the resource pool to provision the instance toskip_agent_install
(Boolean) Whether to skip installation of the Morpheus agenttags
(Map of String) Tags to assign to the instancetimeouts
(Block, Optional) (see below for nested schema)user_group_id
(Number) The id of the user group associated with the instancevolumes
(Block List) The instance volumes to create (see below for nested schema)workflow_id
(Number) The ID of the provisioning workflow to execute (workflow_name
can be used alternatively, only one is needed)workflow_name
(String) The name of the provisioning workflow to execute (workflow_id
can be used alternatively, only one is needed)
id
(String) The ID of the instance
Optional:
export
(Boolean) Whether the environment variable is exported as an instance tagmasked
(Boolean) Whether the environment variable is masked for security purposesname
(String) The name of the environment variablevalue
(String) The value of the environment variable
Optional:
ip_address
(String)ip_mode
(String)network_group
(Boolean) Whether the network id provided is for a network group or notnetwork_id
(Number) The network to assign the network interface tonetwork_interface_type_id
(Number) The network interface type
Optional:
create
(String)delete
(String)read
(String)update
(String)
Optional:
datastore_id
(Number) The ID of the datastorename
(String) The name/type of the LV being createdroot
(Boolean) Whether the volume is the root volume of the instancesize
(Number) The size of the LV being createdsize_id
(Number) The ID of an existing LV to assign to the instancestorage_type
(Number) The ID of the LV type
Import is supported using the following syntax:
terraform import morpheus_vsphere_instance.tf_example_vsphere_instance 1