feat: Linode Provider v2 migration and infrastructure cleanup #35

Merged
bobby merged 3 commits from feat/01a-linode-terraform-cleanup into main 2026-11-17 23:44:08 -05:00
4 changed files with 18 additions and 19 deletions
Showing only changes of commit 27abc1891b - Show all commits

No files matched your search

@@ -61,7 +61,7 @@ infra/
#### PostgreSQL (`infra/postgres/`) #### PostgreSQL (`infra/postgres/`)
- LKE (Linode Kubernetes Engine) clusters for staging and production - LKE (Linode Kubernetes Engine) clusters for staging and production
- Configurable pool sizes (10 for staging, 25 for production) - Configurable pool sizes (2 for staging, 3 for production)
- Separate database names (`hapi_staging`, `hapi_production`) - Separate database names (`hapi_staging`, `hapi_production`)
- Random password generation for database access - Random password generation for database access
+12 -15
View File
@@ -14,6 +14,18 @@ terraform {
version = "~> 3.0" version = "~> 3.0"
} }
} }
# Backend configuration for Terraform state using S3-compatible Linode Object Storage
backend "s3" {
bucket = "hapi-terraform-state-${var.environment}"
key = "terraform/${var.environment}/terraform.tfstate"
region = var.linode_region
endpoint = "https://${var.linode_region}.linodeobjects.com"
encrypt = true
access_key = var.object_storage_access_key
secret_key = var.object_storage_secret_key
skip_region_validation = true
}
} }
# Provider configurations are in providers.tf # Provider configurations are in providers.tf
@@ -45,18 +57,3 @@ module "network" {
linode_region = var.linode_region linode_region = var.linode_region
environment = var.environment environment = var.environment
} }
# Backend configuration for Terraform state
# State will be stored in Linode Object Storage
# Backend configuration is defined in infra/backend/
# Backend module (for terraform state storage configuration)
module "backend" {
source = "./backend"
linode_region = var.linode_region
linode_object_storage_cluster = var.linode_object_storage_cluster
object_storage_access_key = var.object_storage_access_key
object_storage_secret_key = var.object_storage_secret_key
environment = var.environment
}
+1 -3
View File
@@ -18,10 +18,8 @@ resource "linode_firewall" "hapi" {
label = "hapi-firewall-${var.environment}" label = "hapi-firewall-${var.environment}"
tags = toset([for k, v in var.tags : "${k}=${v}"]) tags = toset([for k, v in var.tags : "${k}=${v}"])
# Inbound policy # Default policies - DROP for security (explicit ACCEPT rules for allowed traffic)
inbound_policy = "DROP" inbound_policy = "DROP"
# Outbound policy
outbound_policy = "DROP" outbound_policy = "DROP"
# Inbound rules # Inbound rules
+4
View File
@@ -3,4 +3,8 @@
# Provider configurations # Provider configurations
# These use the sources defined in main.tf terraform block # These use the sources defined in main.tf terraform block
provider "linode" {
token = var.linode_token
}
provider "random" {} provider "random" {}