Terraform CLI

Next, we’ll install the Terraform CLI. Terraform is a command-line utility which allows you to apply the Terraform CDK generated configurations.

You may use tenv to manage multiple versions of terraform or OpenTofu. Follow the installation instructions for your operating system.

Using tenv, download terraform 1.7.3 with the following command.

tenv terraform install 1.7.3

You can check the terraform version:

$ terraform --version
1.7.3
When using tenv, best practice to set TERRAFORM_BINARY_NAME environment variable for CDKTF CLI.
export TERRAFORM_BINARY_NAME=$(which terraform)

See Also #




We use analytics to make this content better, but only with your permission.

More information