This page describes the steps to install Terraform for Trusted Cloud in Cloud Shell and in a local shell. Cloud Shell is an interactive shell environment for Trusted Cloud that lets you learn and experiment with Trusted Cloud and manage your projects and resources from your web browser.
For a introductory guide to using Terraform with Trusted Cloud, see the Terraform for Trusted Cloud Quickstart.
Cloud Shell
To use an online terminal with the gcloud CLI and Terraform already set up, activate Cloud Shell:
At the bottom of this page, a Cloud Shell session starts and displays a command-line prompt. It can take a few seconds for the session to initialize.
Run the following command to verify that Terraform is available:
terraform
The output should be similar to the following:
Usage: terraform [global options] <subcommand> [args] The available commands for execution are listed below. The primary workflow commands are given first, followed by less common or more advanced commands. Main commands: init Prepare your working directory for other commands validate Check whether the configuration is valid plan Show changes required by the current configuration apply Create or update infrastructure destroy Destroy previously-created infrastructure
To use Terraform with Trusted Cloud, you should ensure the following tasks are completed within Trusted Cloud:
- Create or have a Trusted Cloud project.
- Enable billing for the Trusted Cloud project.
- Enable APIs for the Trusted Cloud services you intend to work with.
- Set up authentication for Terraform.
Local shell
Use the installation instructions provided by Terraform.
Run the following command to verify that Terraform is available:
terraform
The output should be similar to the following:
Usage: terraform [global options] <subcommand> [args] The available commands for execution are listed below. The primary workflow commands are given first, followed by less common or more advanced commands. Main commands: init Prepare your working directory for other commands validate Check whether the configuration is valid plan Show changes required by the current configuration apply Create or update infrastructure destroy Destroy previously-created infrastructure
To use Terraform with Trusted Cloud, you should ensure the following tasks are completed within Trusted Cloud:
- Create or have a Trusted Cloud project.
- Enable billing for the Trusted Cloud project.
- Enable APIs for the Trusted Cloud services you intend to work with.
- Set up authentication for Terraform.
What's next
- Work through the Terraform for Trusted Cloud quickstart
- Learn about the basic Terraform commands.