feat(deploy): Terraform-стек IoT (nubes_http: EMQX + iot-service) — провайдер nubes-test 3.1.0
This commit is contained in:
@@ -0,0 +1,132 @@
|
||||
# variables.tf — входные переменные стека IoT.
|
||||
# Значения — в terraform.tfvars (не коммитится, см. .gitignore).
|
||||
|
||||
variable "api_token" {
|
||||
type = string
|
||||
sensitive = true
|
||||
description = "Токен Nubes API (test.token)"
|
||||
}
|
||||
|
||||
variable "api_endpoint" {
|
||||
type = string
|
||||
default = "https://lk-api-gateway-test.ngcloud.ru/api/v1/svc"
|
||||
description = "Endpoint Nubes API (TEST). Менять вместе с source провайдера"
|
||||
}
|
||||
|
||||
variable "realm" {
|
||||
type = string
|
||||
description = "Ресурсная платформа K8s (должна существовать в ЛК; у PG Инстанса foriot — iot-naeel)"
|
||||
}
|
||||
|
||||
# ── Домены (короткое имя → платформа создаёт DNS в зоне realm; FQDN → проверка A-записи) ──
|
||||
variable "emqx_domain" {
|
||||
type = string
|
||||
default = "exqx-iot"
|
||||
description = "Домен EMQX (wss MQTT)"
|
||||
}
|
||||
|
||||
variable "iot_domain" {
|
||||
type = string
|
||||
default = "iot-api"
|
||||
description = "Домен iot-service (REST)"
|
||||
}
|
||||
|
||||
# ── Реестр ──
|
||||
variable "registry" {
|
||||
type = string
|
||||
default = "gitea.services.ngcloud.ru/nail"
|
||||
description = "Gitea container registry (namespace nail)"
|
||||
}
|
||||
|
||||
variable "iot_service_version" {
|
||||
type = string
|
||||
default = "v0.1.13"
|
||||
}
|
||||
|
||||
variable "iot_emqx_version" {
|
||||
type = string
|
||||
default = "v0.2.4"
|
||||
}
|
||||
|
||||
# ── PostgreSQL (managed, инстанс foriot 509145c3) ──
|
||||
variable "pg_host" {
|
||||
type = string
|
||||
default = "postgresqlk8s-master.509145c3-ba71-4687-a084-d9dcbc88d3d2.svc.cluster.local"
|
||||
}
|
||||
|
||||
variable "pg_port" {
|
||||
type = string
|
||||
default = "5432"
|
||||
}
|
||||
|
||||
variable "pg_db" {
|
||||
type = string
|
||||
default = "iotdb"
|
||||
}
|
||||
|
||||
variable "pg_user" {
|
||||
type = string
|
||||
default = "iotservice"
|
||||
description = "PG-пользователь (платформенный regex ^[A-Za-z0-9]+$ — подчёркивание нельзя)"
|
||||
}
|
||||
|
||||
variable "pg_password" {
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
# ── shared-SQS (тенант demo-service) ──
|
||||
variable "sqs_endpoint" {
|
||||
type = string
|
||||
default = "https://sqs.sinefo.ru"
|
||||
description = "Публичный endpoint shared-sqs (на ВМ 213, не в кластере)"
|
||||
}
|
||||
|
||||
variable "sqs_access_key" {
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "sqs_secret_key" {
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "sqs_queue_name" {
|
||||
type = string
|
||||
default = "iot-telemetry"
|
||||
}
|
||||
|
||||
variable "sqs_dlq_name" {
|
||||
type = string
|
||||
default = "iot-telemetry-dlq"
|
||||
}
|
||||
|
||||
# ── MQTT (bridge iot-service → EMQX) ──
|
||||
variable "mqtt_username" {
|
||||
type = string
|
||||
default = "iot-bridge"
|
||||
}
|
||||
|
||||
variable "mqtt_password" {
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "mqtt_host" {
|
||||
type = string
|
||||
default = ""
|
||||
description = "Внутренний адрес EMQX. Пусто → вычисляется из state_out EMQX (проверить в ЛК при первом apply)"
|
||||
}
|
||||
|
||||
# ── JWT API ──
|
||||
variable "jwt_hmac_secret" {
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "admin_stats_token" {
|
||||
type = string
|
||||
sensitive = true
|
||||
default = ""
|
||||
}
|
||||
Reference in New Issue
Block a user