Terraform on Google Cloud documentation

Learn how to use Terraform to reliably provision infrastructure on Google Cloud.Learn more

Start building and deploying on Google Cloud with afree trial.

Start your proof of concept with $300 in free credit

  • Develop with our latest Generative AI models and tools.
  • Get free usage of 20+ popular products, including Compute Engine and AI APIs.
  • No automatic charges, no commitment.

Keep exploring with 20+ always-free products.

Access 20+ free products for common use cases, including AI APIs, VMs, data warehouses, and more.

Documentation resources

Find quickstarts and guides, review key references, and get help with common issues.

Related resources

Explore self-paced training, use cases, reference architectures, and code samples with examples of how to use and connect Google Cloud services.
Training
Training and tutorials

Learn Terraform fundamentals

In this lab, you install Terraform and create a VM instance using Terraform.

Training
Training and tutorials

Learn how to automate Infrastructure on Google Cloud with Terraform

In this lab, you write infrastructure as code with Terraform.

Training
Training and tutorials

Learn how to build Cloud Infrastructure with Terraform

In this lab, you learn how to describe and launch cloud resources with Terraform.

Training
Training and tutorials

Learn about managing state

In this lab, you learn how to store Terraform state in Google Cloud Storage.

Training
Training and tutorials

Learn to use Terraform modules

In this lab, you learn how modules can address problems of code complexity, duplication, and reuse.

Training
Training and tutorials

Learn to use policy validation

In this lab, you learn how to enforce policies on Terraform configurations.

Code sample
Code Samples

Resource samples

Find samples to build your infrastructure.

Code sample
Code Samples

Blueprints

Find deployable, reusable Terraform modules.

Related videos

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 2025-12-15 UTC.