- Add vSphere resource pool management - Configure CPU and memory allocation controls - Implement tagging system for organization - Add comprehensive documentation
32 lines
729 B
HCL
32 lines
729 B
HCL
terraform {
|
|
required_providers {
|
|
vsphere = {
|
|
source = "vmware/vsphere"
|
|
}
|
|
vault = {
|
|
source = "hashicorp/vault"
|
|
}
|
|
}
|
|
}
|
|
|
|
# Configure the Vault provider
|
|
provider "vault" {
|
|
address = "https://wbyc-srv-docker01.bsdserver.lan:8200"
|
|
auth_login {
|
|
path = "auth/approle/login"
|
|
parameters = {
|
|
role_id = var.role_id
|
|
secret_id = var.secret_id
|
|
}
|
|
}
|
|
}
|
|
|
|
# vSphere Provider
|
|
provider "vsphere" {
|
|
vsphere_server = data.vault_generic_secret.vmware.data["vcenter_server"]
|
|
user = data.vault_generic_secret.vmware.data["vcenter_username"]
|
|
password = data.vault_generic_secret.vmware.data["vcenter_password"]
|
|
|
|
allow_unverified_ssl = true
|
|
}
|