mirror of
https://gitlab.sarex.io/infra/terraform-contour-mirror.git
synced 2026-08-05 18:31:00 +03:00
Add prod kafka test topic
This commit is contained in:
parent
48ff34fad3
commit
594926c48c
@ -18,7 +18,17 @@ environments:
|
||||
allow_partition_decrease: false
|
||||
|
||||
kafka:
|
||||
topics: []
|
||||
topics:
|
||||
- name: sarex.prod.kafka-topics-test.events.v1
|
||||
owner: kafka-topics-test
|
||||
clusterRef: prod
|
||||
partitions: 1
|
||||
replicationFactor: 1
|
||||
config:
|
||||
cleanup.policy: delete
|
||||
retention.ms: "604800000"
|
||||
min.insync.replicas: "1"
|
||||
deletionPolicy: orphan
|
||||
|
||||
namespaces:
|
||||
- name: pulse
|
||||
|
||||
@ -16,11 +16,6 @@ resource "random_password" "user_password" {
|
||||
}
|
||||
}
|
||||
|
||||
data "yandex_mdb_postgresql_cluster" "existing" {
|
||||
for_each = toset([for db in var.databases : db.cluster_id])
|
||||
cluster_id = each.value
|
||||
}
|
||||
|
||||
resource "yandex_mdb_postgresql_user" "this" {
|
||||
for_each = local.databases_map
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ output "databases" {
|
||||
value = {
|
||||
for key, db in local.databases_map : key => {
|
||||
cluster_id = db.cluster_id
|
||||
host = try(data.yandex_mdb_postgresql_cluster.existing[db.cluster_id].host[0].fqdn, "")
|
||||
host = try(db.database.host, "")
|
||||
port = 6432
|
||||
database_name = yandex_mdb_postgresql_database.this[key].name
|
||||
user_name = yandex_mdb_postgresql_user.this[key].name
|
||||
@ -17,7 +17,7 @@ output "database_outputs_map" {
|
||||
description = "Map for secrets module (cluster_id:db_name:user_name => credentials)"
|
||||
value = {
|
||||
for key, db in local.databases_map : key => {
|
||||
host = try(data.yandex_mdb_postgresql_cluster.existing[db.cluster_id].host[0].fqdn, "")
|
||||
host = try(db.database.host, "")
|
||||
database_name = yandex_mdb_postgresql_database.this[key].name
|
||||
user_name = yandex_mdb_postgresql_user.this[key].name
|
||||
password = random_password.user_password[key].result
|
||||
|
||||
@ -4,6 +4,7 @@ variable "databases" {
|
||||
cluster_id = string
|
||||
database = object({
|
||||
name = string
|
||||
host = optional(string, "")
|
||||
lc_collate = optional(string, "en_US.UTF-8")
|
||||
lc_type = optional(string, "en_US.UTF-8")
|
||||
extensions = optional(list(string), [])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user