++ stand kafka plaintext and plan mode
All checks were successful
Terraform Terragrunt (contour) / validate (push) Successful in 1m9s
Terraform Terragrunt (contour) / plan (push) Successful in 1m15s
Terraform Terragrunt (contour) / apply (push) Successful in 1m9s

This commit is contained in:
Kochetkov S 2026-10-28 15:47:31 +03:00
parent 869674a9cd
commit afe61a5944
2 changed files with 16 additions and 3 deletions

View File

@ -8,6 +8,7 @@ on:
env:
INFRA_ENV: ${{ vars.INFRA_ENV }}
STACKS: ${{ vars.STACKS }}
TF_MODE: ${{ vars.TF_MODE }}
PG_ADMIN_HOST: ${{ vars.PG_ADMIN_HOST }}
PG_ADMIN_PORT: ${{ vars.PG_ADMIN_PORT }}
PG_ADMIN_USER: ${{ vars.PG_ADMIN_USER }}
@ -95,9 +96,21 @@ jobs:
[ -f "$base/$u/terragrunt.hcl" ] && units="$units $u"
done
echo "units:$units"
changed=""
for u in $units; do
echo "::group::$u"
(cd "$base/$u" && terragrunt run -- apply -auto-approve -input=false)
if [ "${TF_MODE:-apply}" = "plan" ]; then
rc=0
(cd "$base/$u" && terragrunt run -- plan -detailed-exitcode -input=false -lock=false) || rc=$?
[ "$rc" -eq 2 ] && changed="$changed $u"
[ "$rc" -ne 0 ] && [ "$rc" -ne 2 ] && exit "$rc"
else
(cd "$base/$u" && terragrunt run -- apply -auto-approve -input=false)
fi
echo "::endgroup::"
done
if [ -n "$changed" ]; then
echo "plan has changes in:$changed"
exit 2
fi
rm -f /tmp/infra-secret-values.yaml

View File

@ -4,8 +4,8 @@ kafka_cluster_refs:
host: kafka-kafka-contour.kafka.svc.cluster.local
port: 9092
sasl_mechanism: SCRAM-SHA-512
security_protocol: SASL_SSL
tls_enabled: true
security_protocol: SASL_PLAINTEXT
tls_enabled: false
default_partitions: 3
default_replication_factor: 1
max_replication_factor: 1