Install Terraform Stay organized with collections Save and categorize content based on your preferences.
This page describes the steps to install Terraform forGoogle Cloud inCloud Shell and in a local shell.Cloud Shell is an interactive shell environment for Google Cloudthat lets you learn and experiment with Google Cloud and manage yourprojects and resources from your web browser.
For a introductory guide to using Terraform with Google Cloud, see theTerraform for Google Cloud Quickstart.
Cloud Shell
To use an online terminal with the gcloud CLI and Terraformalready set up, activate Cloud Shell:
At the bottom of this page, a Cloud Shell session starts anddisplays a command-line prompt. It can take a few seconds for the sessionto initialize.
Run the following command to verify that Terraform is available:
terraformThe output should be similar to the following:
Usage:terraform[global options]<subcommand>[args]Theavailablecommandsforexecutionarelistedbelow.Theprimaryworkflowcommandsaregivenfirst,followedbylesscommonormoreadvancedcommands.Maincommands:initPrepareyourworkingdirectoryforothercommandsvalidateCheckwhethertheconfigurationisvalidplanShowchangesrequiredbythecurrentconfigurationapplyCreateorupdateinfrastructuredestroyDestroypreviously-createdinfrastructureTo use Terraform with Google Cloud, you should ensure the following tasks are completed within Google Cloud:
- Create or have a Google Cloud project.
- Enable billingfor the Google Cloud project.
- Enable APIs for theGoogle Cloud services you intend to work with.
- Set up authentication forTerraform.
Local shell
Use theinstallation instructions provided by Terraform.
Run the following command to verify that Terraform is available:
terraformThe output should be similar to the following:
Usage:terraform[globaloptions]<subcommand>[args]Theavailablecommandsforexecutionarelistedbelow.Theprimaryworkflowcommandsaregivenfirst,followedbylesscommonormoreadvancedcommands.Maincommands:initPrepareyourworkingdirectoryforothercommandsvalidateCheckwhethertheconfigurationisvalidplanShowchangesrequiredbythecurrentconfigurationapplyCreateorupdateinfrastructuredestroyDestroypreviously-createdinfrastructureTo use Terraform with Google Cloud, you should ensure the following tasks are completed within Google Cloud:
- Create or have a Google Cloud project.
- Enable billingfor the Google Cloud project.
- Enable APIs for theGoogle Cloud services you intend to work with.
- Set up authentication forTerraform.
What's next
- Work through theTerraform for Google Cloud quickstart
- Learn about thebasic Terraform commands.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-18 UTC.