Удалить ресурс из state terraform
Удалить ресурс из state без его уничтожения в облаке
terraform state rm 'aws_instance.legacy'
more terraform
all 43 commands →
Вывести outputs
terraform output -json | jq 'to_entries[] | {(.key): .value.value}'
Уничтожить конкретный ресурс
terraform destroy -target='aws_instance.web' -auto-approve
Разблокировать state
terraform force-unlock <lock-id>
Создать и переключить workspace
terraform workspace new staging && terraform workspace select staging
Граф зависимостей
terraform graph | dot -Tsvg > graph.svg && open graph.svg