Init first
To get started with terraform you need to prepare your working directory for other commands.
terraform initCreate your main.tf file
Your main.tf should only specify terraform configuration as well as provider configurations.
Example
terraform {
required_providers {
proxmox = {
source = "bpg/proxmox"
version = "0.82.1"
}
}
}
provider "proxmox" {
endpoint = var.proxmox_endpoint
api_token = var.proxmox_api_token
insecure = false
tmp_dir = "/var/tmp"
ssh {
agent = true
username = var.proxmox_ssh_username
password = var.proxmox_ssh_password
}
}