-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoutputs.tf
More file actions
108 lines (86 loc) · 3.42 KB
/
outputs.tf
File metadata and controls
108 lines (86 loc) · 3.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# ============================================
# Terraform Outputs
# ============================================
output "resource_group_name" {
description = "Azure Resource Group name"
value = azurerm_resource_group.main.name
}
output "aks_cluster_name" {
description = "AKS Cluster name"
value = azurerm_kubernetes_cluster.main.name
}
output "aks_get_credentials_command" {
description = "Command to get AKS credentials"
value = "az aks get-credentials --resource-group ${azurerm_resource_group.main.name} --name ${azurerm_kubernetes_cluster.main.name}"
}
output "postgresql_fqdn" {
description = "PostgreSQL Flexible Server FQDN"
value = azurerm_postgresql_flexible_server.main.fqdn
}
output "redis_queue_hostname" {
description = "Azure Cache for Redis (Queue) hostname"
value = azurerm_redis_cache.queue.hostname
}
output "redis_cache_hostname" {
description = "Azure Cache for Redis (Cache) hostname"
value = azurerm_redis_cache.cache.hostname
}
output "teable_url" {
description = "Teable application URL"
value = "https://${var.teable_domain}"
}
output "next_steps" {
description = "Next steps after deployment"
value = <<-EOT
=========================================
🎉 Deployment Complete!
=========================================
1. Get AKS credentials:
az aks get-credentials --resource-group ${azurerm_resource_group.main.name} --name ${azurerm_kubernetes_cluster.main.name}
2. Install NGINX Ingress Controller:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.9.4/deploy/static/provider/cloud/deploy.yaml
3. Get Ingress External IP:
kubectl get svc -n ingress-nginx ingress-nginx-controller -w
4. Configure DNS:
Point ${var.teable_domain} to the Ingress External IP
5. Apply Ingress configuration:
kubectl apply -f ingress.yaml
6. Access Teable:
https://${var.teable_domain}
Check pod status:
kubectl get pods -n teable
View logs:
kubectl logs -n teable -l app=teable -f
EOT
}
# Sensitive outputs (use -json flag to see)
output "postgresql_password" {
description = "PostgreSQL admin password"
value = random_password.postgresql.result
sensitive = true
}
output "minio_password" {
description = "MinIO root password"
value = random_password.minio.result
sensitive = true
}
output "teable_secret_key" {
description = "Teable secret key"
value = random_password.secret_key.result
sensitive = true
}
# Resource summary
output "resource_summary" {
description = "Summary of deployed resources"
value = <<-EOT
📊 Resource Summary:
────────────────────────────────────────
PostgreSQL: ${var.postgresql_sku} (2 vCPU, 8GB RAM)
Redis Queue: ${var.redis_queue_sku} C${var.redis_queue_capacity} (~1GB)
Redis Cache: ${var.redis_cache_sku} C${var.redis_cache_capacity} (~1GB)
AKS Nodes: ${var.aks_node_count} x ${var.aks_node_size}
Teable Pods: ${var.teable_hpa_min_replicas}-${var.teable_hpa_max_replicas} (HPA enabled)
Pod Resources: ${var.teable_cpu_limit} CPU, ${var.teable_memory_limit} RAM
────────────────────────────────────────
EOT
}