feat(terraform): enable S3 remote state backend (MinIO)

Migrate terraform state from local file to MinIO S3 bucket (terraform-state).
Backend config: https://minio-api.riotpiao.homelab.com (external endpoint).
State now persisted remotely, shared across team, safe for cluster rebuild.

Also added terraform-state bucket to MinIO managed buckets.
This commit is contained in:
Story Crater Bot
2026-07-14 23:30:45 -07:00
parent 3eccf9f653
commit 6d554961c2
2 changed files with 11 additions and 17 deletions
+1
View File
@@ -66,6 +66,7 @@ resource "helm_release" "minio" {
# Buckets auto-created on install (all-in-one, no post-hook needed) # Buckets auto-created on install (all-in-one, no post-hook needed)
buckets = [ buckets = [
{ name = "terraform-state", policy = "none", purge = false },
{ name = "vault", policy = "none", purge = false }, { name = "vault", policy = "none", purge = false },
{ name = "riotpiao-models", policy = "none", purge = false }, { name = "riotpiao-models", policy = "none", purge = false },
{ name = "loki-chunks", policy = "none", purge = false }, { name = "loki-chunks", policy = "none", purge = false },
+10 -17
View File
@@ -1,20 +1,13 @@
# Temporarily disabled S3 (MinIO unreachable) # S3 backend (MinIO remote state)
# terraform {
# backend "s3" {
# bucket = "terraform-state"
# key = "homelab/terraform.tfstate"
# region = "us-east-1"
# endpoint = "https://minio-api.riotpiao.homelab.com"
# skip_credentials_validation = true
# skip_requesting_account_id = true
# skip_region_validation = true
# use_path_style = true
# }
# }
# Local backend fallback (active during MinIO outage)
terraform { terraform {
backend "local" { backend "s3" {
path = "terraform.tfstate" bucket = "terraform-state"
key = "homelab/terraform.tfstate"
region = "us-east-1"
endpoint = "https://minio-api.riotpiao.homelab.com"
skip_credentials_validation = true
skip_requesting_account_id = true
skip_region_validation = true
use_path_style = true
} }
} }