- Add vSphere resource pool management - Configure CPU and memory allocation controls - Implement tagging system for organization - Add comprehensive documentation
91 lines
2.0 KiB
HCL
91 lines
2.0 KiB
HCL
|
|
variable "datacenter" {
|
|
description = "vSphere data center"
|
|
type = string
|
|
}
|
|
|
|
variable "cluster_name" {
|
|
description = "vSphere Cluster Name"
|
|
type = string
|
|
}
|
|
|
|
|
|
# Environment
|
|
variable "environment" {
|
|
description = "Environment name can be: dev, tst, acc, uat, prod, shared or tools"
|
|
type = string
|
|
}
|
|
|
|
# Resource Groups
|
|
variable "resource_groups" {
|
|
type = map(object({
|
|
name = string
|
|
cpu_reservation = optional(number, 0)
|
|
cpu_expandable = optional(bool, true)
|
|
cpu_limit = optional(number, -1)
|
|
cpu_shares = optional(string, "normal")
|
|
memory_reservation = optional(number, 0)
|
|
memory_expandable = optional(bool, true)
|
|
memory_limit = optional(number, -1)
|
|
memory_shares = optional(string, "normal")
|
|
}))
|
|
description = "Map of resource groups to create"
|
|
default = {
|
|
kubernetes = {
|
|
name = "Kubernetes"
|
|
}
|
|
docker = {
|
|
name = "Docker"
|
|
}
|
|
infra = {
|
|
name = "Infra"
|
|
}
|
|
}
|
|
}
|
|
|
|
# Vault approle
|
|
variable "role_id" {
|
|
description = "Role ID for Vault AppRole authentication"
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "secret_id" {
|
|
description = "Secret ID for Vault AppRole authentication"
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
# Domain
|
|
variable "domain" {
|
|
description = "Domain name"
|
|
type = string
|
|
default = ""
|
|
}
|
|
|
|
# ESXi Hosts
|
|
variable "esxi_hosts" {
|
|
description = "Map of ESXi hosts configuration"
|
|
type = map(object({
|
|
name = string
|
|
ip_address = string
|
|
tags = optional(map(string), {})
|
|
}))
|
|
default = {}
|
|
}
|
|
|
|
# Port Groups
|
|
variable "port_groups" {
|
|
description = "Map of port groups configuration"
|
|
type = map(object({
|
|
vlan_id = number
|
|
allow_promiscuous = optional(bool, false)
|
|
subnet_address = string
|
|
subnet_mask = number
|
|
gateway_ip = string
|
|
nameserver_id = number
|
|
hosts = list(string)
|
|
}))
|
|
default = {}
|
|
}
|