feat: IoT demo — RabbitMQ + Redis + MongoDB + Node.js producer plan (test stand cleanup)

This commit is contained in:
“Naeel”
2026-07-21 21:58:00 +04:00
parent 0adb379a54
commit a37fc22bcd
16 changed files with 215 additions and 225 deletions
+4 -5
View File
@@ -10,12 +10,11 @@ locals {
consumer_kafka_user_key = try(nonsensitive(local.consumer_kafka_secrets["iot-app"]["user.key"]), "")
consumer_redis_host = try(nubes_redis.main.state_out_flat["internalConnect.master"], "")
consumer_redis_secrets = try(jsondecode(nubes_redis.main.vault_secrets["users"]), tomap({}))
consumer_redis_password = try(nonsensitive(lookup(local.consumer_redis_secrets, "default", tomap({})).password), "")
consumer_redis_password = try(nonsensitive(nubes_redis.main.vault_secrets["adminPass"]), "")
consumer_mongo_host = try(nubes_mongodb.main.state_out_flat["internalConnect"], "")
consumer_mongo_secrets = try(jsondecode(nubes_mongodb.main.vault_secrets["users"]), tomap({}))
consumer_mongo_password = try(nonsensitive(lookup(local.consumer_mongo_secrets, "admin", tomap({})).password), "")
consumer_mongo_user = try(nonsensitive(nubes_mongodb.main.vault_secrets["adminUser"]), "admin")
consumer_mongo_password = try(nonsensitive(nubes_mongodb.main.vault_secrets["adminPass"]), "")
}
resource "nubes_flask" "consumer" {
@@ -56,7 +55,7 @@ resource "nubes_flask" "consumer" {
REDIS_HOST = local.consumer_redis_host
REDIS_PORT = "6379"
REDIS_PASSWORD = local.consumer_redis_password
MONGO_URI = "mongodb://admin:${local.consumer_mongo_password}@${local.consumer_mongo_host}:27017/iot?authSource=admin"
MONGO_URI = "mongodb://${local.consumer_mongo_user}:${local.consumer_mongo_password}@${local.consumer_mongo_host}:27017/iot?authSource=admin"
MONGO_DB = "iot"
})