mirror of
https://gitlab.sarex.io/infra/terraform-contour-mirror.git
synced 2026-08-05 18:31:00 +03:00
- Add infrastructure.yaml as single source of truth (like values.yaml in Helm) - Make all modules universal (no hardcoded entity names) - Use existing PostgreSQL cluster instead of creating new one - Add yc-database module for working with existing PostgreSQL - Add k8s-secret module with lifecycle.ignore_changes support - Update terragrunt.hcl files to read from infrastructure.yaml - Remove scripts, use native Terragrunt functions (yamldecode)
21 lines
583 B
HCL
21 lines
583 B
HCL
# Универсальный модуль для создания Kubernetes секрета
|
||
# Не знает про конкретные сущности, работает с любыми данными
|
||
|
||
resource "kubernetes_secret" "this" {
|
||
metadata {
|
||
name = var.secret_name
|
||
namespace = var.namespace
|
||
labels = var.labels
|
||
annotations = var.annotations
|
||
}
|
||
|
||
type = var.secret_type
|
||
|
||
data = var.data
|
||
|
||
# Защита от перезаписи если указано в lifecycle
|
||
lifecycle {
|
||
ignore_changes = var.ignore_changes ? [data] : []
|
||
}
|
||
}
|