All checks were successful
Code Quality & Security Scan / TFLint (push) Successful in 18s
Code Quality & Security Scan / Tfsec Security Scan (push) Successful in 28s
Code Quality & Security Scan / Checkov Security Scan (push) Successful in 38s
Code Quality & Security Scan / SonarQube Trigger (push) Successful in 33s
Code Quality & Security Scan / Terraform Init (push) Successful in 1m0s
Code Quality & Security Scan / Terraform Apply (push) Successful in 48s
Changes: - Added default values to datacenter, cluster_name, and environment variables - Default values match production environment (WBYC-DC01, wbyc-cluster01, prd) - Updated variable descriptions to note CI/CD secret usage - terraform.tfvars has been cleaned locally (already in .gitignore) Benefits: - No terraform.tfvars file needed for standard deployment - CI/CD secrets can override defaults when needed - Cleaner repository without sensitive data - Variables have sensible defaults for this environment
60 lines
1.5 KiB
HCL
60 lines
1.5 KiB
HCL
|
|
variable "datacenter" {
|
|
description = "vSphere data center (provided via CI/CD secrets as TF_VAR_datacenter)"
|
|
type = string
|
|
default = "WBYC-DC01"
|
|
}
|
|
|
|
variable "cluster_name" {
|
|
description = "vSphere Cluster Name (provided via CI/CD secrets as TF_VAR_cluster_name)"
|
|
type = string
|
|
default = "wbyc-cluster01"
|
|
}
|
|
|
|
# Environment
|
|
variable "environment" {
|
|
description = "Environment name can be: dev, tst, acc, uat, prod, shared or tools (provided via CI/CD secrets as TF_VAR_environment)"
|
|
type = string
|
|
default = "prd"
|
|
}
|
|
|
|
# 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
|
|
}
|