++ gate kafka sasl on admin password presence instead of a sentinel value

This commit is contained in:
Kochetkov S 2026-08-11 15:26:40 +03:00
parent ce6228d6f2
commit 0758eb9fc4

View File

@ -103,8 +103,8 @@ provider "kafka" {
${get_env("KAFKA_CA_CERT", "")}
EOT
%{endif~}
%{if trimspace(get_env("KAFKA_SASL_MECHANISM", "plain")) != "none"~}
sasl_mechanism = "${trimspace(get_env("KAFKA_SASL_MECHANISM", "plain"))}"
%{if get_env("KAFKA_ADMIN_PASSWORD", "") != ""~}
sasl_mechanism = "${get_env("KAFKA_SASL_MECHANISM", "plain")}"
sasl_username = "${get_env("KAFKA_ADMIN_USER", "inter_broker_user")}"
sasl_password = "${get_env("KAFKA_ADMIN_PASSWORD", "")}"
%{endif~}