Shell-based wrapper to simplify resource targeting
- Works with wrappers like
tfenv
- Works and tested with Terraform 1.0 and higher
- Allows passing any parameters to the
terraform
binary - Allows reviewing the changes once more
- Install fzf
- Download the script
terraform-target
- Place it into your
PATH
- Check, that all required tools are installed:
terraform-target check-requirements
All commands can be supplied with additional Terraform parameters, they all are passed as is
Executes terraform plan
and shows possible targets list to choose from.
After that, executes terraform apply -target=...
on the targets selected.
Executes terraform apply -target=...
on targets, that were previously selected in this shell.
Useful, when you need to re-apply the same changes, if the previous apply failed.
Shows known resources in the state to choose from.
After that, executes terraform apply -replace=...
on the targets selected.
Shows known resources in the state to choose from.
After that, executes terraform destroy -target=...
on the targets selected.
Written with ❤️ and without ChatGPT help