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-08-18 15:08:01 -07:00
parent 22e18c6f33
commit 49eabd0e46
2 changed files with 11 additions and 17 deletions
+10 -17
View File
@@ -1,20 +1,13 @@
# Temporarily disabled S3 (MinIO unreachable)
# 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)
# S3 backend (MinIO remote state)
terraform {
backend "local" {
path = "terraform.tfstate"
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
}
}