Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Terraform Cookbook
  • Table Of Contents Toc
Terraform Cookbook

Terraform Cookbook - Second Edition

By : Mikael Krief
4.7 (50)
close
close
Terraform Cookbook

Terraform Cookbook

4.7 (50)
By: Mikael Krief

Overview of this book

Imagine effortlessly provisioning complex cloud infrastructure across various cloud platforms, all while ensuring robustness, reusability, and security. Introducing the Terraform Cookbook, Second Edition - your go-to guide for mastering Infrastructure as Code (IaC) effortlessly. This new edition is packed with real-world examples for provisioning robust Cloud infrastructure mainly across Azure but also with a dedicated chapter for AWS and GCP. You will delve into manual and automated testing with Terraform configurations, creating and managing a balanced, efficient, reusable infrastructure with Terraform modules. You will learn how to automate the deployment of Terraform configurations through continuous integration and continuous delivery (CI/CD), unleashing Terraform's full potential. New chapters have been added that describe the use of Terraform for Docker and Kubernetes, and explain how to test Terraform configurations using different tools to check code and security compliance. The book devotes an entire chapter to achieving proficiency in Terraform Cloud, covering troubleshooting strategies for common issues and offering resolutions to frequently encountered errors. Get the insider knowledge to boost productivity with Terraform - the indispensable guide for anyone adopting Infrastructure as Code solutions.
Table of Contents (20 chapters)
close
close
16
Other Books You May Enjoy
17
Index

Using a GCS backend in GCP

If you use Terraform to provision a resource on GCP, like for Azure and AWS, we need to store the Terraform state in the backend.

In this recipe, we will learn how to store a Terraform state file in a GCP storage bucket.

Let’s get started!

Getting ready

There are no specific requirements to complete this recipe.

In this recipe, we will create a GCP storage bucket manually in the GCP dashboard and we will configure the Terraform block to use this GCP storage bucket as a state backend.

To create a GCP bucket, perform these steps:

  1. Log in to your GCP console.
  2. Go to the left menu and navigate to Cloud Storage > Buckets.
Une image contenant texte  Description générée automatiquement

Figure 9.20: GCP Buckets menu

  1. Click on the CREATE button.
Une image contenant texte  Description générée automatiquement

Figure 9.21: GCP bucket CREATE button

  1. Fill in the form with the bucket name (here the bucket name is given as example, choose another unique name).
Une image contenant texte  Description générée automatiquement

Figure 9.22: GCP –...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Terraform Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon