GithubHelp home page GithubHelp logo

harjot1singh / terraform-example Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 3.0 14 KB

An example terraform + terragrunt repository. Features Google Kubernetes Engine, Google Cloud SQL, Google Cloud Proxy, NGINX.

Home Page: http://harjot.me/blog/deploying-docker-containers-to-gke-using-terraform

License: MIT License

HCL 100.00%
terraform terragrunt devops docker kubernetes gke google-cloud-platform

terraform-example's Introduction

terraform-example

This repository contains an example terraform + terragrunt configuration to deploy infrastructure declaratively as code.

View the accompanying blog post: http://harjot.me/blog/deploying-docker-containers-to-gke-using-terraform

The following prerequisites are required:

  • Google Cloud Project per environment (development + production)
  • Kubectl
  • Terraform
  • Terragrunt

The following will be deployed by the repo:

Structure

All terraform files in terraform. Usually, this would sit alongside application code.

terraform/modules contain Terraform-only reusable module definitions.

terraform/live/[env] contain subfolders for each service/infrastructure, each containing a terragrunt.hcl which reference the aforementioned modules.

Usage

cd into terraform/live/[development] or [production] depending on the environment you'd like to work with. You can run terragrunt plan-all or terragrunt apply-all.

Production Tips

These will be implemented in the future.

  • Use a Cloud Proxy Sidecar to allow your applications to interact with Cloud SQL.
  • Use an Ingress Controller instead of exposing each service as a LoadBalancer. This way you have one central point of entry. The Traefik controller is great.

terraform-example's People

Contributors

harjot1singh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.