Add default values to variables and remove terraform.tfvars
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
This commit is contained in:
Patrick de Ruiter 2025-11-02 02:06:55 +01:00
parent 514136f018
commit 7f9945461f
Signed by: pderuiter
GPG Key ID: 5EBA7F21CF583321

View File

@ -1,19 +1,21 @@
variable "datacenter" { variable "datacenter" {
description = "vSphere data center" description = "vSphere data center (provided via CI/CD secrets as TF_VAR_datacenter)"
type = string type = string
default = "WBYC-DC01"
} }
variable "cluster_name" { variable "cluster_name" {
description = "vSphere Cluster Name" description = "vSphere Cluster Name (provided via CI/CD secrets as TF_VAR_cluster_name)"
type = string type = string
default = "wbyc-cluster01"
} }
# Environment # Environment
variable "environment" { variable "environment" {
description = "Environment name can be: dev, tst, acc, uat, prod, shared or tools" description = "Environment name can be: dev, tst, acc, uat, prod, shared or tools (provided via CI/CD secrets as TF_VAR_environment)"
type = string type = string
default = "prd"
} }
# Resource Groups # Resource Groups