This commit is contained in:
2024-05-23 19:02:24 +02:00
parent c6bb50fca4
commit 8a08647dd6
20 changed files with 610 additions and 458 deletions

View File

@@ -0,0 +1,18 @@
resource "random_password" "system" {
length = 16
special = false
}
resource "kubectl_manifest" "secret" {
yaml_body = <<-EOF
apiVersion: v1
kind: Secret
metadata:
name: "${var.instance}-${var.component}"
labels: ${jsonencode(local.sonar_all_labels)}
namespace: ${var.namespace}
type: Opaque
stringData:
SONAR_WEB_SYSTEMPASSCODE: "${random_password.system.result}"
EOF
}