Patrick de Ruiter 3ee45d2603
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
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
2025-11-01 23:02:03 +01:00

36 lines
812 B
HCL

terraform {
required_version = ">= 1.0"
required_providers {
vsphere = {
source = "vmware/vsphere"
version = "~> 2.0"
}
vault = {
source = "hashicorp/vault"
version = "~> 5.0"
}
}
}
# Configure the Vault provider
provider "vault" {
address = "https://wbyc-srv-docker01.bsdserver.lan:8200"
auth_login {
path = "auth/approle/login"
parameters = {
role_id = var.role_id
secret_id = var.secret_id
}
}
}
# vSphere Provider
provider "vsphere" {
vsphere_server = data.vault_generic_secret.vmware.data["vcenter_server"]
user = data.vault_generic_secret.vmware.data["vcenter_username"]
password = data.vault_generic_secret.vmware.data["vcenter_password"]
allow_unverified_ssl = true
}