Fix all TFLint warnings
- 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:
parent
b9a4e24583
commit
3ee45d2603
5
data.tf
5
data.tf
@ -10,8 +10,3 @@ data "vsphere_compute_cluster" "cluster" {
|
|||||||
name = var.cluster_name
|
name = var.cluster_name
|
||||||
datacenter_id = data.vsphere_datacenter.dc.id
|
datacenter_id = data.vsphere_datacenter.dc.id
|
||||||
}
|
}
|
||||||
|
|
||||||
data "vsphere_host" "host" {
|
|
||||||
name = "esxi101.bsdserver.lan"
|
|
||||||
datacenter_id = data.vsphere_datacenter.dc.id
|
|
||||||
}
|
|
||||||
|
|||||||
@ -1,10 +1,14 @@
|
|||||||
terraform {
|
terraform {
|
||||||
|
required_version = ">= 1.0"
|
||||||
|
|
||||||
required_providers {
|
required_providers {
|
||||||
vsphere = {
|
vsphere = {
|
||||||
source = "vmware/vsphere"
|
source = "vmware/vsphere"
|
||||||
|
version = "~> 2.0"
|
||||||
}
|
}
|
||||||
vault = {
|
vault = {
|
||||||
source = "hashicorp/vault"
|
source = "hashicorp/vault"
|
||||||
|
version = "~> 5.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
33
variables.tf
33
variables.tf
@ -55,36 +55,3 @@ variable "secret_id" {
|
|||||||
type = string
|
type = string
|
||||||
sensitive = true
|
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 = {}
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user