Skip to content

Latest commit

 

History

History

vcenter-resource-pool

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Terraform VSphere Resource Pool Module

This module allows you to create and manage resource pools and entity permissions. Permissions can be created on an entity for a given user or group with the specified role.

Requirements

Name Version
terraform >= 1.3.0
vsphere >= 2.0.2

Usage

Basic usage of this module is as follows:

module "example" {
	 source  = "<module-path>"

	 # Required variables
	 datacenter  = 
	 name  = 
	 parent_path  = 

	 # Optional variables
	 cpu_expandable  = true
	 cpu_limit  = -1
	 cpu_reservation  = 0
	 cpu_share_level  = "normal"
	 cpu_shares  = 4
	 memory_expandable  = true
	 memory_limit  = -1
	 memory_reservation  = 0
	 memory_share_level  = "normal"
	 memory_shares  = 500
	 resource_pool_tags  = []
	 role_assignments  = {}
	 scale_descendants_shares  = "disabled"
}

Resources

Name Type
vsphere_entity_permissions.entity_permissions resource
vsphere_resource_pool.resource_pool resource
vsphere_compute_cluster.vsphere_compute_cluster data source
vsphere_datacenter.vsphere_datacenter data source
vsphere_host.vsphere_host data source
vsphere_resource_pool.vsphere_resource_pool data source
vsphere_role.vsphere_role data source

Inputs

Name Description Type Default Required
cpu_expandable Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. bool true no
cpu_limit The CPU utilization of a resource pool will not exceed this limit, even if there are available resources number -1 no
cpu_reservation Amount of CPU (MHz) that is guaranteed available to the resource pool number 0 no
cpu_share_level The CPU allocation level string "normal" no
cpu_shares The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set, cpu_share_level must be custom number 4 no
datacenter The name of the vSphere datacenter where the resource pool will be created string n/a yes
memory_expandable Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. bool true no
memory_limit The CPU utilization of a resource pool will not exceed this limit, even if there are available resources. number -1 no
memory_reservation Amount of CPU (MHz) that is guaranteed available to the resource pool number 0 no
memory_share_level The memory allocation level. string "normal" no
memory_shares The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set, memory_share_level must be custom number 500 no
name The name of the new resource pool string n/a yes
parent_path The inventory path to the parent of the new resource pool. Can be a cluster, host, or another resource pool.
Examples 'Cluster/cluster-1', 'ResourcePool/foo-resource-pool', 'Host/esxi-123456.abc12345.asia-southeast1.gve.goog'
string n/a yes
resource_pool_tags Friendly name for the dataset being provisioned. list(string) [] no
role_assignments A map of principals and permissions to attach to the resource pool
map(object({
user_or_group = string
is_group = bool
propagate = bool
role = string
}))
{} no
scale_descendants_shares Determines if the shares of all descendants of the resource pool are scaled up or down when the shares of the resource pool are scaled up or down string "disabled" no

Outputs

Name Description
vsphere_resource_pool The vsphere_resource_pool resource object of the created vcenter resource pool.