Kickstart Terraform on GCP with Google Cloud Shell

OCT 24 2018 RILEY KARSON

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.

Video

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

Are you interested in telling others your HashiCorp story or perhaps how HashiCorp products helped with that amazing thing you built? Let us know. Email your story or idea to guestblogs@hashicorp.com.

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Getting Started Use the Current Stable Version (7.1) Buil...
    Leonzai阅读 1,969评论 0 3
  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,418评论 0 10
  • 我也曾有小时候,望着天上的那片云 羡慕云的那边,有无尽宽广的世界, 仿佛世间最好的一切,都在那边 于是我把青春,都...
    叫我三米大人阅读 247评论 0 0
  • 我想 在妈妈肚子里的时候就懂得爱她 不乱踢那个粉色的小天地 我想 在妈妈下班后又累又饿的时候 不大哭大闹而让她顾不...
    寐不成若阅读 219评论 0 2
  • 連續假期就這樣結束了~ 放飛自我的心情,也該收一收了。 開始迎接新的一天…
    Lasly阅读 73评论 0 0