This page provides an overview of the resources available for using Terraform with Google Cloud.
Terraform is an open source tool that lets you provision Google Cloud resources with declarative configuration files—resources such as virtual machines, containers, storage, and networking. Terraform's infrastructure-as-code (IaC) approach supports DevOps best practices for change management, letting you manage Terraform configuration files in source control to maintain an ideal provisioning state for testing and production environments.
Use the following resources to help you get started with using Terraform with Google Cloud:
- Get started with Terraform.
- Read Hashicorp's documentation on Getting Started with the Google Provider and an overview of the Google Cloud Provider.
- Read Google's best practices for using Terraform.
- Build your infrastructure-as-code skills and learn about Managing infrastructure as code with Terraform, Cloud Build, and GitOps. This tutorial shows you how to automate provisioning with Terraform.
- For a list of Terraform modules available for Google Cloud, see Terraform blueprints catalog.
- To control access and ensure compliance for using Terraform, create configurations with Private Catalog. Private Catalog lets you curate and distribute Terraform configurations to users in your Google Cloud organization, so that they only deploy the latest approved versions. For details, see the Private Catalog guide for creating a Terraform configuration.
- For a deeper understanding of using Terraform with Google Cloud, see the following resources:
Use Google Cloud tools for Terraform
There are a variety of tools you can use to optimize your Terraform experience:
- Export your Google Cloud resources into Terraform format.
- Import your Google Cloud resources into Terraform state.
- Explore the Cloud Foundation Toolkit, which provides a series of reference modules for Terraform. The modules reflect Google Cloud best practices for using Terraform. Using these modules helps you to get started with Terraform more quickly. The modules are documented in the Terraform Registry and open sourced on GitHub.
gcloud beta terraform vetto enforce policies on Terraform configurations for Google Cloud.
- Import existing Google Cloud resources into Terraform with Terraformer.
- Learn more about Cloud Shell. Terraform is integrated with Cloud Shell, and Cloud Shell automatically authenticates Terraform, letting you get started with less set up. To learn more, see the Kickstart Terraform on GCP with Google Cloud Shell blog.
Get Terraform support for Google Cloud
The Terraform provider for Google Cloud is jointly developed by HashiCorp and Google, with support for more than 250 Google Cloud resources. The core Terraform CLI is developed by HashiCorp.