Major improvements: - Import existing Azure AKS cluster with aztfexport - Optimize VM size from Standard_D4d_v4 to Standard_D2as_v6 (50% cost reduction) - Configure availability zones to [1, 2] - Add comprehensive monitoring setup: * New Log Analytics Workspace * OMS Agent integration * Data Collection Rule for Container Insights * Email alerts for CPU and Memory - Refactor configuration: * Extract all values to variables.tf * Rename resources with meaningful names * Add detailed outputs.tf - Add project documentation: * Comprehensive README.md * cluster-status-commands.md with useful Azure CLI commands * terraform.tfvars.example template * .gitignore for sensitive files Infrastructure changes: - Resource Group: trusted_ai_demo_rg (Germany West Central) - AKS Cluster: trai_k8s_cluster (Kubernetes 1.33) - Node Pool: 2-3 nodes with auto-scaling - Network: VNet 10.0.0.0/16, Subnet 10.0.0.0/24 - Monitoring: Full Container Insights with alerts Cost optimization: ~€75/month (down from ~€140/month) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
84 lines
1.9 KiB
Terraform
84 lines
1.9 KiB
Terraform
variable "location" {
|
|
description = "Azure region for resources"
|
|
type = string
|
|
default = "germanywestcentral"
|
|
}
|
|
|
|
variable "resource_group_name" {
|
|
description = "Name of the resource group"
|
|
type = string
|
|
default = "trusted_ai_demo_rg"
|
|
}
|
|
|
|
variable "vnet_name" {
|
|
description = "Name of the virtual network"
|
|
type = string
|
|
default = "trusted_ai_demo_vn"
|
|
}
|
|
|
|
variable "vnet_address_space" {
|
|
description = "Address space for the virtual network"
|
|
type = list(string)
|
|
default = ["10.0.0.0/16"]
|
|
}
|
|
|
|
variable "subnet_name" {
|
|
description = "Name of the subnet"
|
|
type = string
|
|
default = "default"
|
|
}
|
|
|
|
variable "subnet_address_prefixes" {
|
|
description = "Address prefixes for the subnet"
|
|
type = list(string)
|
|
default = ["10.0.0.0/24"]
|
|
}
|
|
|
|
variable "aks_cluster_name" {
|
|
description = "Name of the AKS cluster"
|
|
type = string
|
|
default = "trai_k8s_cluster"
|
|
}
|
|
|
|
variable "aks_dns_prefix" {
|
|
description = "DNS prefix for the AKS cluster"
|
|
type = string
|
|
default = "traik8scluster"
|
|
}
|
|
|
|
variable "aks_node_pool_min_count" {
|
|
description = "Minimum number of nodes in the AKS node pool"
|
|
type = number
|
|
default = 2
|
|
}
|
|
|
|
variable "aks_node_pool_max_count" {
|
|
description = "Maximum number of nodes in the AKS node pool"
|
|
type = number
|
|
default = 3
|
|
}
|
|
|
|
variable "aks_node_vm_size" {
|
|
description = "VM size for AKS node pool"
|
|
type = string
|
|
default = "Standard_D2as_v6"
|
|
}
|
|
|
|
variable "aks_node_zones" {
|
|
description = "Availability zones for AKS nodes"
|
|
type = list(string)
|
|
default = ["1", "2"]
|
|
}
|
|
|
|
variable "alert_email_address" {
|
|
description = "Email address for alert notifications"
|
|
type = string
|
|
sensitive = true
|
|
}
|
|
|
|
variable "subscription_id" {
|
|
description = "Azure subscription ID"
|
|
type = string
|
|
default = "77677a80-2dea-493d-9867-f1c961b80fb3"
|
|
}
|