Files
cbazzaandClaude Opus 4.5 fddc78618e
Build and Deploy to Synology NAS / test (push) Failing after 15m0s
Build and Deploy to Synology NAS / build (push) Has been cancelled
Build and Deploy to Synology NAS / deploy (push) Has been cancelled
Build and Deploy to Synology NAS / notify (push) Has been cancelled
feat: add Azure AKS deployment infrastructure with Terraform
- Add Terraform configuration for AKS cluster deployment
- Add Kubernetes manifests for Laravel app (deployment, services, secrets)
- Add PostgreSQL on Kubernetes with multi-schema support
- Add Nginx Ingress Controller configuration
- Add GitHub Actions workflow for Azure deployment
- Add HTTP Basic Authentication for production
- Add database restore functionality via Kubernetes jobs
- Update Dockerfile and nginx config for production
- Update database.php for multi-schema connections
- Add deployment documentation and quickstart guides

Deployed version: 1.0.7 at http://72.144.113.194/

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 09:43:08 +01:00

41 lines
1.4 KiB
Terraform

# Data sources for existing resources
data "azurerm_resource_group" "main" {
name = var.resource_group_name
}
data "azurerm_kubernetes_cluster" "main" {
name = var.aks_cluster_name
resource_group_name = var.resource_group_name
}
data "azurerm_subscription" "current" {}
# Generate random suffix for unique resource names
resource "random_string" "suffix" {
length = 8
special = false
upper = false
}
# Generate random password for PostgreSQL if not provided
resource "random_password" "postgresql_admin_password" {
count = var.postgresql_admin_password == null ? 1 : 0
length = 32
special = true
}
# Local variables
locals {
app_name_safe = replace(var.app_name, "_", "-")
postgresql_server_name = "${local.app_name_safe}-psql-${random_string.suffix.result}"
postgresql_db_name = replace(var.app_name, "-", "_")
postgresql_admin_pass = var.postgresql_admin_password != null ? var.postgresql_admin_password : random_password.postgresql_admin_password[0].result
app_url = var.app_url != "" ? var.app_url : (var.ingress_host != "" ? "https://${var.ingress_host}" : (var.ingress_enabled ? "http://${try(data.kubernetes_service.ingress_nginx[0].status[0].load_balancer[0].ingress[0].ip, "pending")}" : "ingress-not-enabled"))
common_labels = {
app = var.app_name
environment = var.app_env
managed-by = "terraform"
}
}