terraform-contour-mirror/modules/k8s-secret/main.tf
kochetkov.s be34bc617b refactor: Use unified infrastructure.yaml config file
- 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)
2026-01-19 15:28:39 +03:00

21 lines
583 B
HCL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Универсальный модуль для создания 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] : []
}
}