From a68f3e0e70ec496b59a3739ad1f8d88e20155d00 Mon Sep 17 00:00:00 2001 From: Taqi Tahmid Date: Thu, 15 Jan 2026 00:54:59 +0200 Subject: [PATCH] swap proxmox backend from s3 to gitlab http --- infra/terraform/proxmox/backend.tf | 21 ++++++------- infra/terraform/proxmox/variables.tf | 44 ++++++++++++++++++---------- 2 files changed, 37 insertions(+), 28 deletions(-) diff --git a/infra/terraform/proxmox/backend.tf b/infra/terraform/proxmox/backend.tf index dbe613a..d3801c2 100644 --- a/infra/terraform/proxmox/backend.tf +++ b/infra/terraform/proxmox/backend.tf @@ -1,14 +1,11 @@ terraform { - backend "s3" { - bucket = "terraform-state" # Name of the MinIO bucket - key = "proxmox/terraform.tfstate" # Path to the state file in the bucket - endpoint = var.minio_endpoint # MinIO API endpoint - access_key = var.minio_access_key # MinIO access key - secret_key = var.minio_secret_key # MinIO secret key - region = "us-east-1" # Arbitrary region (MinIO ignores this) - skip_credentials_validation = true # Skip AWS-specific credential checks - skip_metadata_api_check = true # Skip AWS metadata API checks - skip_region_validation = true # Skip AWS region validation - use_path_style = true # Use path-style URLs[](http:///) + backend "http" { + address = var.http_address + lock_address = var.http_lock_address + unlock_address = var.http_lock_address + lock_method = "POST" + unlock_method = "DELETE" + retry_wait_min = 5 + } -} \ No newline at end of file +} diff --git a/infra/terraform/proxmox/variables.tf b/infra/terraform/proxmox/variables.tf index f86382c..dc109b6 100644 --- a/infra/terraform/proxmox/variables.tf +++ b/infra/terraform/proxmox/variables.tf @@ -1,16 +1,28 @@ -# variables for minio backend configuration -variable "minio_access_key" { - description = "MinIO access key" +# variables for Terraform HTTP backend +variable "http_username" { + description = "Username for HTTP backend" + type = string + sensitive = true +} + +variable "http_password" { + description = "Password for HTTP backend" + type = string + sensitive = true +} + +variable "http_address" { + description = "HTTP backend address" type = string } -variable "minio_secret_key" { - description = "MinIO secret key" +variable "http_lock_address" { + description = "HTTP backend lock address" type = string } -variable "minio_endpoint" { - description = "MinIO API endpoint" +variable "http_unlock_address" { + description = "HTTP backend unlock address" type = string } @@ -52,15 +64,15 @@ variable "pm_ssh_private_key_path" { variable "vms" { description = "List of VMs to create" type = list(object({ - name = string - node_name = string - vm_id = number - ip_address = string + name = string + node_name = string + vm_id = number + ip_address = string dns_servers = list(string) - gateway = string - cores = number - memory = number - disk_size = number + gateway = string + cores = number + memory = number + disk_size = number })) } @@ -78,4 +90,4 @@ variable "vm_user_password" { description = "Password for the VM user" type = string sensitive = true -} \ No newline at end of file +}