feat(infrastructure): update rabbitmq env

This commit is contained in:
2025-10-05 22:13:07 +02:00
parent d4da625408
commit 7ee45b451e
5 changed files with 43 additions and 6 deletions

View File

@@ -1,5 +1,9 @@
terraform {
required_providers {
kubectl = {
source = "gavinbunney/kubectl"
version = "1.19.0"
}
helm = {
source = "hashicorp/helm"
version = "3.0.2" # Doporučuji použít novější verzi providera
@@ -56,3 +60,26 @@ resource "helm_release" "rabbitmq_operator" {
}
]
}
resource "kubectl_manifest" "rabbitmq_cluster" {
yaml_body = templatefile("${path.module}/rabbit-cluster.yaml", {
replicas = var.rabbitmq_replicas
password = var.rabbitmq-password
})
depends_on = [
helm_release.rabbitmq_operator
]
}
resource "kubectl_manifest" "rabbit_ui" {
yaml_body = templatefile("${path.module}/rabbit-ui.yaml", {
base_domain = var.base_domain
})
depends_on = [
kubectl_manifest.rabbitmq_cluster
]
}