Refresh-only план (детект дрейфа) terraform
Синхронизировать state с реальной инфраструктурой без изменений; показывает внешний дрейф
terraform plan -refresh-only
more terraform
all 43 commands →
Миграция backend при init
terraform init -migrate-state -backend-config=backend.hcl
Запрос outputs через jq
terraform output -json | jq -r '.endpoints.value[]'
Трассировка плана через TF_LOG
TF_LOG=DEBUG TF_LOG_PATH=tf.log terraform plan
Plan с файлом переменных
terraform plan -var-file=prod.tfvars -out=plan.tfplan
Apply сохранённого плана
terraform apply plan.tfplan