Using the Cloud Foundation Toolkit with Terraform

Using the Cloud Foundation Toolkit with Terraform

Learn how to deploy a microservices app to Google Cloud with Terraform and the Cloud Foundation Toolkit. Rapid cloud foundation buildout and workload deployment using Terraform. #DevOps. Kelly Dodson. Cloud Technical Resident.

Last year, we released the Cloud Foundation Toolkit, open source templates that help you quickly build a strong cloud foundation according to best practices. These modules are available for both the Terraform infrastructure-as-code framework, as well as our own Cloud Deployment Manager.

This blog post will detail building a secure cloud foundation using the Cloud Foundation Toolkit Terraform example foundation. From there, we will explore how to deploy a microservices demo application onto the foundation using Terraform. After reading this content, we hope you learn how to accomplish the following: 

  • Reduce the time required to build out an enterprise cloud foundation to less than one day following Google best practices
  • Use your cloud foundation by deploying a demo Google Kubernetes Engine (GKE) workload onto the foundation using Terraform
  • Deploy a GKE cluster at the highest level of security based on Google expert recommendations (IAP with TCP forwarding bastion host)

Getting started

To get started with using the Cloud Foundation Toolkit, first you need to understand Terraform and Linux command line basics. Then, you will need to make sure you have the following prerequisites.


  1. A GCP Organization
  2. A GCP Billing Account
  3. Ability to create Cloud Identity / G Suite groups
  4. Linux command line access with the following installed and configured:
  5. Google Cloud SDK
  6. Terraform
  7. Git

Building out a cloud foundation

First, you will need to clone the Terraform example foundation repository.

Git clone[](

This repo contains several distinct Terraform projects each within their own directory that must be applied separately, but in sequence. Each of these Terraform projects are to be layered on top of each other, running in the following order. 

0-bootstrap: The purpose of this step is to bootstrap a GCP organization, creating all the required resources & permissions to start using the Cloud Foundation Toolkit (CFT). This step also configures Cloud Build & Cloud Source Repositories for foundations code in subsequent stages.

google cloud platform devops & sre

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Overview of Google Cloud Essentials Quest

If you looking to learn about Google Cloud in depth or in general with or without any prior knowledge in cloud computing, then you should definitely check this quest out.

Multi-cloud Spending: 8 Tips To Lower Cost

Mismanagement of multi-cloud expense costs an arm and leg to business and its management has become a major pain point. Here we break down some crucial tips to take some of the management challenges off your plate and help you optimize your cloud spend.

Preparing for the Google Cloud Profesional DevOps Exam — Exam Study Resources

DevOps is an ever in-demand skillset that companies and government entities are now clearly in need of. Passing the Google Cloud Professional DevOps Engineer exam will distinguish you as a leader in this constantly evolving area of development.

Google Cloud Associate Cloud Engineer Tutorial  — TechCommanders

In this section, the main areas are progressively more technical and requires hands-on experience to really understand how to deploy services such as GKE, DataStore, Pub/Sub, etc. Networking, Storage and Compute are covered in detail with a focus on Compute Engine, GKE, BigQuery, Cloud Storage, and Deployment Manager.

The basics of Google Cloud Platform (GCP)

The Cloud is a complicated space. It’s not a simple plug and play as most people would imagine. Let’s simplify the Cloud: GCP Edition. The Cloud is a complicated space.