tftarget
A Terraform plan/apply target tool
Features
You can interactivity select resource to plan/appply with target option.
tftarget plan
tftarget apply
Requirements
The tftarget invokes the Terraform command, so Terraform must be installed on the local environment.
Getting Started
We have prepared a sandbox environment where Terraform can be run in a Docker environment, so please clone the repository and try it out.
$ git clone https://github.com/orangekame3/tftarget.git
Please navigate to the 'sandbox' directory.
$ cd tftarget/sandbox
Please run the compose.yml file.
$ docker compose -f compose.yml up -d localstack
Now that localstack has started, you should be able to run Terraform.
Please run the following command to confirm that Terraform is functioning properly.
$ terraform init
$ terraform plan
Once you have reached this point, the preparation is complete.
Install
GO
$ go install github.com/orangekame3/tftarget@latest
Download
Download the latest compiled binaries and put it anywhere in your executable path.
https://github.com/orangekame3/tftarget/releases
Usage
$ tftarget --help
tftarget is a CLI library for Terraform plan/apply with target option.
You can interactivity select resource to plan/appply with target option.
Usage:
tftarget [command]
Available Commands:
apply Terraform apply, interactively select resource to apply with target option
completion Generate the autocompletion script for the specified shell
help Help about any command
plan Terraform plan, interactively select resource to plan with target option
Flags:
-h, --help help for tftarget
-t, --toggle Help message for toggle
-v, --version version for tftarget
Use "tftarget [command] --help" for more information about a command.
License
MIT