Kickstart Terraform on GCP with Google Cloud Shell
Riley Karson is a software engineer at Google, where he works as a contributor to the Google Cloud Platform provider for Terraform. Outside of work, Riley loves board gaming and hiking.
HashiCorp Terraform is a powerful open-source infrastructure automation tool for provisioning and managing infrastructure as code. Google has been collaborating with HashiCorp since 2013 to help customers who use Terraform and other HashiCorp tools make optimal use of Google Cloud Platform (GCP) services and features.
As both Terraform and GCP grew in popularity, we continued to integrate our tools more deeply to smooth the developer experience. But while there’s a long and growing list of Terraform GCP provider resources, getting started with Terraform on GCP can take a few steps:
- Install Terraform
- Configure a GCP service account
- Copy a config that (hopefully) worked from the documentation.
Today, we’re excited to show you a new and easy way to avoid this manual process using Google Cloud Shell. With Cloud Shell, you get command-line access to your cloud resources directly from your browser, so you can easily manage projects and resources without having to install any tools on your system. Further, command-line tools such as Terraform and other utilities are automatically authenticated, so you can use them setup-free.
You may notice several examples in the GCP provider documentation now have an “Open in Cloud Shell” button, letting you launch sample Terraform configurations with a single click. Click on the button to launch an interactive Cloud Shell session with the example loaded and Terraform ready to use. This way, you can use real, working Terraform configs in Cloud Shell and iterate on ideas before bringing them into your team’s infrastructure-as-code provisioning workflow.
In short, with this new integration with Cloud Shell, learning to use new GCP resources in Terraform is easier than ever:
- Instantly get started learning infrastructure as code with Terraform on GCP—no experience required
- Easily onboard new teammates directly from Terraform’s documentation
To get started with our virtual machine instance example below. Be sure to follow us on Twitter, and to open a GitHub issue if you have any questions.
For more information about Terraform, please visit: https://www.terraform.io
Sign up for the latest HashiCorp news
More blog posts like this one
Terraform delivers launch-day support for Amazon S3 Tables, EKS Hybrid Nodes, and more at re:Invent
The Terraform provider for AWS now enables users to manage a variety of new services just announced at re:Invent.
HashiCorp at re:Invent 2024: Infrastructure Lifecycle Management with AWS
A recap of HashiCorp infrastructure news and developments on AWS from the past year, from a new provider launch to simplifying infrastructure provisioning and more.
Simplify policy adoption in Terraform with pre-written Sentinel policies for AWS
HashiCorp introduces a new pre-written policy library co-developed with AWS, aiming to reduce the barrier of adoption for policy as code infrastructure workflows.