Миграция backend при init terraform
Перенести state в новый backend; -reconfigure пропускает миграцию и сбрасывает настройки
terraform init -migrate-state -backend-config=backend.hcl
more terraform
all 43 commands →
Запрос 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
Импорт существующего ресурса
terraform import module.path.resource_type.name <remote-id>