Fix all TFLint warnings
All checks were successful
Code Quality & Security Scan / TFLint (push) Successful in 18s
Code Quality & Security Scan / Checkov Security Scan (push) Successful in 35s
Code Quality & Security Scan / SonarQube Trigger (push) Successful in 35s

- Added version constraints for vsphere (~> 2.0) and vault (~> 5.0) providers
- Added terraform required_version (>= 1.0)
- Removed unused variables: domain, esxi_hosts, port_groups
- Removed unused data source: vsphere_host
- All TFLint checks now pass successfully
This commit is contained in:
Patrick de Ruiter 2025-11-01 23:02:03 +01:00
parent b9a4e24583
commit 3ee45d2603
Signed by: pderuiter
GPG Key ID: 5EBA7F21CF583321
3 changed files with 6 additions and 40 deletions

View File

@ -10,8 +10,3 @@ data "vsphere_compute_cluster" "cluster" {
name = var.cluster_name
datacenter_id = data.vsphere_datacenter.dc.id
}
data "vsphere_host" "host" {
name = "esxi101.bsdserver.lan"
datacenter_id = data.vsphere_datacenter.dc.id
}

View File

@ -1,10 +1,14 @@
terraform {
required_version = ">= 1.0"
required_providers {
vsphere = {
source = "vmware/vsphere"
source = "vmware/vsphere"
version = "~> 2.0"
}
vault = {
source = "hashicorp/vault"
source = "hashicorp/vault"
version = "~> 5.0"
}
}
}

View File

@ -55,36 +55,3 @@ variable "secret_id" {
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 = {}
}