Some checks failed
Code Quality & Security Scan / Terraform Init (push) Has started running
Code Quality & Security Scan / Terraform Apply (push) Has been cancelled
Code Quality & Security Scan / TFLint (push) Successful in 19s
Code Quality & Security Scan / Terraform Destroy (push) Has been skipped
Code Quality & Security Scan / Tfsec Security Scan (push) Successful in 22s
Code Quality & Security Scan / Checkov Security Scan (push) Successful in 34s
Code Quality & Security Scan / SonarQube Trigger (push) Successful in 47s
Issue: - Cache steps were timing out after ~5 minutes with ETIMEDOUT errors - Gitea Actions cache server not configured or not responding - Connection attempts to 172.19.0.3:36175 failing - Added 8-10 minutes of unnecessary delays to pipeline Solution: - Removed 'Cache Terraform Providers' step from terraform-init job - Removed 'Restore Terraform Cache' step from terraform-apply job - Terraform init will download providers fresh each time - No performance degradation since cache was never working Impact: - Faster pipeline execution (removes timeout delays) - No functional changes (cache was never successful) - Apply job still independent and self-contained Note: terraform-vsphere-network never had cache steps (copied before caching was added)
Terraform vSphere Resource Groups Module
This Terraform module manages vSphere resource pools (resource groups) with CPU/memory allocation controls and integrated tagging for organization and management.
Purpose
Creates and manages vSphere resource pools with configurable resource allocation policies, reservations, limits, and shares. Includes automated tagging for environment and resource group classification.
What It Does
- Creates resource pools under vSphere cluster
- Configures CPU reservations, limits, and shares
- Configures memory reservations, limits, and shares
- Creates tag categories for Environment and ResourceGroupType
- Applies tags to resource pools for organization
Usage
module "vsphere_resource_groups" {
source = "./terraform-vsphere-resourcegroups"
datacenter = "DC1"
cluster_name = "Cluster01"
environment = "prod"
role_id = var.vault_role_id
secret_id = var.vault_secret_id
resource_groups = {
kubernetes = {
name = "Kubernetes"
cpu_reservation = 4000
cpu_shares = "high"
memory_reservation = 8192
memory_shares = "high"
}
docker = {
name = "Docker"
cpu_shares = "normal"
memory_shares = "normal"
}
infra = {
name = "Infrastructure"
cpu_shares = "low"
memory_shares = "low"
}
}
}
Key Features
- Resource Allocation: CPU and memory reservations, limits, shares
- Shares Mapping: Automatic conversion of low/normal/high to vSphere values (500/1000/2000)
- Tagging System: Environment and resource group type tags
- Flexible Configuration: Optional parameters with sensible defaults
- Expandable Resources: Allow resources to grow beyond reservations
Default Resource Groups
- Kubernetes: For Kubernetes infrastructure
- Docker: For Docker containers
- Infra: For infrastructure services
Prerequisites
- VMware vSphere with compute cluster
- Vault with vSphere credentials
- Terraform >= 0.13
Description
Terraform module for managing vSphere resource pools (resource groups) with CPU/memory resource allocation controls and tagging
Languages
HCL
100%