diff --git a/main.tf b/main.tf index f457a6e..6960264 100644 --- a/main.tf +++ b/main.tf @@ -1,9 +1,3 @@ -terraform { - backend "local" { - path = "${var.HOME}/Nextcloud/tofu/terraform.tfstate" - } -} - module "lxc" { source = "./proxmox_lxc_container" diff --git a/providers.tf b/providers.tf index 2f1eea4..8bb43c9 100644 --- a/providers.tf +++ b/providers.tf @@ -5,6 +5,20 @@ terraform { version = "0.76.0" } } + + backend "s3" { + bucket = "opentofu" + region = "garage" + key = "homelab/terraform.tfstate" + endpoints = { + s3 = "https://garage.mateu.be" + } + use_path_style = true + skip_credentials_validation = true + skip_region_validation = true + skip_requesting_account_id = true + skip_metadata_api_check = true + } } provider "proxmox" { diff --git a/variables.tf b/variables.tf index 2a7997f..1f69936 100644 --- a/variables.tf +++ b/variables.tf @@ -1,7 +1,3 @@ -variable "HOME" { - type = string -} - variable "lxc_containers" { description = "Complete declarative description of a machine" type = map(object({