From 12e80f6a489cc95affdaa808d036afd1a5a3da8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20V=C3=89RET?= Date: Thu, 4 Sep 2025 09:57:02 +0200 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F:=20store=20metadata=20to=20S?= =?UTF-8?q?3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.tf | 6 ------ providers.tf | 14 ++++++++++++++ variables.tf | 4 ---- 3 files changed, 14 insertions(+), 10 deletions(-) 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({