fix: declare providers at project level

This commit is contained in:
2025-07-04 13:53:51 +00:00
parent c524868cf5
commit 4d92a926be
6 changed files with 77 additions and 72 deletions

View File

@@ -5,8 +5,6 @@ module "pve_vm" {
vm_cpu = 2
vm_ram = 2048
vm_vlan = 66
proxmox_endpoint = var.proxmox_endpoint
proxmox_api_token = var.proxmox_api_token
}
output "vm_ip" {

View File

@@ -0,0 +1,18 @@
terraform {
required_providers {
proxmox = {
source = "bpg/proxmox"
}
}
}
provider "proxmox" {
endpoint = var.proxmox_endpoint
api_token = var.proxmox_api_token
insecure = false
ssh {
agent = false
private_key = file("~/.ssh/id_ed25519")
username = "root"
}
}