Skip to content

Terraform-for-Google-Cloud-Essential-Guide, published by Packt

License

Notifications You must be signed in to change notification settings

PacktPublishing/Terraform-for-Google-Cloud-Essential-Guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform for Google Cloud Essential Guide

This is the code repository for Terraform for Google Cloud Essential Guide, published by Packt.

Learn how to provision infrastructure in Google Cloud securely and efficiently

What is this book about?

Google Cloud has adopted Terraform as the standard Infrastructure as Code tool. Thus, a good understanding of Terraform is essential for any cloud architect and engineer working on Google Cloud.

In this book, we take you on a journey starting from the basic concepts to deploying complex architectures with Terraform. Using extensive code examples, we guide you on how to authenticate Terraform in Google Cloud, teach you all the essential concepts of the Terraform language as applied to Google Cloud, and deploy complete working architectures at a push of a button.

This book covers the following exciting features:

  • Multiple methods to authenticate Terraform in Google Cloud
  • Writing efficient Terraform Code
  • Using modules to share Terraform templates
  • Managing multiple Environments in Google Cloud
  • Applying Terraform to deploy multi-tiered architectures
  • Using Public Modules to deploy complex architectures quickly
  • Integrate Terraform into your Google Cloud Environment

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

The code will look like the following:

output "public_ip_address" {
  value = var.static_ip ? google_compute_instance.this.network_interface.0.access_config.0.nat_ip : null
}
output "private_ip_address" {
  value = google_compute_instance.this.network_interface.0.network_ip
}
output "self_link" {
  value = google_compute_instance.this.self_link
}

All of the code is organized into folders and subfolders corresponding to each chapter. For example, chap02/count is the code for Chapter 2, section The count meta-argument

You will have to replace the string <PROJECT-ID> with the project id of your Google Cloud Project. To faciliate that, we have included a small bash script sets the Google Cloud project recursively.

./set-project-id <PROJECT_ID>

replaces all occurances of <PROJECT-ID> in all files to <PROJECT_ID>. Whereas the -u flag undoes the replacement, that is replacing all occurances back <PROJECT-ID>

./set-project-id -u <PROJECT_ID>

replaces all occurances of <PROJECT_ID> in all files to <PROJECT-ID>

Besides the Terraform code, the code also includes a number of gcloud and Shell commands that we use for the exercises. We included those in the files entitled gcloud.sh. It best to copy and then paste the comands into your shell.

Following is what you need for this book: This book is for Google Cloud architects and engineers who want to increase their productivity by using Terraform to automate the provisioning of Google Cloud deployments. A basic understanding of Google Cloud, such as the ability to provision resources using the Google Cloud console and using Cloud Shell, is assumed. Certification in Google Cloud is not required but helpful.

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.

Related products

Get to Know the Author

Bernd Nordhausen is a seasoned cloud architect with over 25 years of experience working with industry leaders such as Intel and Accenture. He is a Google cloud authorized trainer and holds over a dozen cloud certifications from all three major cloud service providers. Currently working as an independent cloud consultant and Google Cloud trainer, Bernd was previously the technical lead for the Google Cloud practice at Accenture Southeast Asia. In that role, he developed and implemented several large-scale deployments on Google Cloud using Terraform. When his head is not in the cloud, Bernd is an aspiring wood worker and trail runner.

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781804619629

About

Terraform-for-Google-Cloud-Essential-Guide, published by Packt

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •