• This repository has been archived on 29/Mar/2023
  • Stars
    star
    107
  • Rank 323,587 (Top 7 %)
  • Language HCL
  • License
    Apache License 2.0
  • Created almost 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Terraform code and scripts for deploying a GCP Virtual Private Cloud (VPC).

Sunset notice

We believe there is an opportunity to create a truly outstanding developer experience for deploying to the cloud, however developing this vision requires that we temporarily limit our focus to just one cloud. Gruntwork has hundreds of customers currently using AWS, so we have temporarily suspended our maintenance efforts on this repo. Once we have implemented and validated our vision for the developer experience on the cloud, we look forward to picking this up. In the meantime, you are welcome to use this code in accordance with the open source license, however we will not be responding to GitHub Issues or Pull Requests.

If you wish to be the maintainer for this project, we are open to considering that. Please contact us at [email protected].


GitHub tag (latest SemVer) Terraform Version

Google VPC Network Modules

This repo contains modules for creating Virtual Private Cloud (VPC) networks on Google Cloud Platform (GCP) following best practices.

Quickstart

If you want to quickly spin up a VPC Network in GCP, you can run the example that is in the root of this repo. Check out network-management example documentation for instructions.

What's in this repo

This repo has the following folder structure:

  • root: The root folder contains an example of how to deploy a service-agnostic "management" VPC network in GCP. See network-management for the documentation.

  • modules: This folder contains the main implementation code for this Module, broken down into multiple standalone submodules.

    The primary module is:

    Inbound traffic to instances in the network is controlled by "access tiers", a pair of subnetwork and network tags. By defining an appropriate subnetwork and tag for an instance, you'll ensure that traffic to and from the instance is properly restricted. See the Access Tier table for more details.

    There are also several supporting modules that add extra functionality on top of vpc-network:

    • network-peering: Configure peering connections between your networks, allowing you to limit access between environments and reduce the risk of production workloads being compromised.

    • project-host-configuration: Configure your project to be a "host project" whose networks can be shared across multiple projects in the organization as part of a defense-in-depth security strategy, and to allow service-level billing across different teams within your organization.

    • network-firewall: Configures the firewall rules expected by the vpc-network module.

  • examples: This folder contains examples of how to use the submodules.

  • test: Automated tests for the submodules and examples.

What's a VPC?

A Virtual Private Cloud (VPC) network or "network" is a private, isolated section of your cloud infrastructure. Networks are a virtual version of a physically segregated network that control connections between your resources and services both on Google Cloud and outside of it.

Networks are global, and a single network can be used for all of your GCP resources across all regions. Subnetworks, ranges of IP addresses within a single region, can be used to usefully partition your private network IP space.

What's a Module?

A Module is a canonical, reusable, best-practices definition for how to run a single piece of infrastructure, such as a database or server cluster. Each Module is written using a combination of Terraform and scripts (mostly bash) and include automated tests, documentation, and examples. It is maintained both by the open source community and companies that provide commercial support.

Instead of figuring out the details of how to run a piece of infrastructure from scratch, you can reuse existing code that has been proven in production. And instead of maintaining all that infrastructure code yourself, you can leverage the work of the Module community to pick up infrastructure improvements through a version number bump.

Who maintains this Module?

This Module and its Submodules are maintained by Gruntwork. If you are looking for help or commercial support, send an email to [email protected].

Gruntwork can help with:

  • Setup, customization, and support for this Module.
  • Modules and submodules for other types of infrastructure, such as VPCs, Docker clusters, databases, and continuous integration.
  • Modules and Submodules that meet compliance requirements, such as HIPAA.
  • Consulting & Training on AWS, Terraform, and DevOps.

How do I contribute to this Module?

Contributions are very welcome! Check out the Contribution Guidelines for instructions.

How is this Module versioned?

This Module follows the principles of Semantic Versioning. You can find each new release, along with the changelog, in the Releases Page.

During initial development, the major version will be 0 (e.g., 0.x.y), which indicates the code does not yet have a stable API. Once we hit 1.0.0, we will make every effort to maintain a backwards compatible API and use the MAJOR, MINOR, and PATCH versions on each release to indicate any incompatibilities.

License

Please see LICENSE for how the code in this repo is licensed.

Copyright © 2019 Gruntwork, Inc.

More Repositories

1

terragrunt

Terragrunt is a flexible orchestration tool that allows Infrastructure as Code written in OpenTofu/Terraform to scale.
Go
7,998
star
2

terratest

Terratest is a Go library that makes it easier to write automated tests for your infrastructure code.
Go
7,425
star
3

cloud-nuke

A tool for cleaning up your cloud accounts by nuking (deleting) all resources within it
Go
2,722
star
4

git-xargs

git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.
Go
928
star
5

terragrunt-infrastructure-live-example

A repo used to show examples file/folder structures you can use with Terragrunt and Terraform
HCL
748
star
6

bash-commons

A collection of reusable Bash functions for handling common tasks such as logging, assertions, string manipulation, and more
Shell
747
star
7

intro-to-terraform

Sample code for the blog post series "A Comprehensive Guide to Terraform."
HCL
732
star
8

fetch

Download files, folders, and release assets from a specific git commit, branch, or tag of public and private GitHub repos.
Go
586
star
9

kubergrunt

Kubergrunt is a standalone go binary with a collection of commands to fill in the gaps between Terraform, Helm, and Kubectl. https://www.gruntwork.io
Go
510
star
10

pre-commit

A collection of pre-commit hooks used by Gruntwork tools
Shell
476
star
11

terraform-google-gke

Terraform code and scripts for deploying a Google Kubernetes Engine (GKE) cluster.
HCL
357
star
12

infrastructure-as-code-training

Materials for learning how to use infrastructure-as-code
Ruby
351
star
13

terragrunt-infrastructure-modules-example

A repo used to show examples file/folder structures you can use with Terragrunt and Terraform
HCL
298
star
14

terraform-aws-utilities

A collection of useful Terraform utilities
HCL
214
star
15

helm-kubernetes-services

Helm charts that can be used to package your applications into production ready deployments for Kubernetes. https://www.gruntwork.io
Go
192
star
16

infrastructure-as-code-testing-talk

Sample code for the talk "How to test your infrastructure code: automated testing for Terraform, Docker, Packer, Kubernetes, and more" by Yevgeniy Brikman
Go
186
star
17

boilerplate

A tool for generating files and folders ("boilerplate") from a set of templates
Go
166
star
18

toc

A Table of Contents of all Gruntwork Code
Shell
117
star
19

health-checker

A simple HTTP server that will return 200 OK if all configured health checks pass.
Go
98
star
20

terraform-google-load-balancer

Terraform modules for deploying Load Balancers in GCP
HCL
93
star
21

terraform-google-sql

Terraform modules for deploying Google Cloud SQL (e.g. MySQL, PostgreSQL) in GCP
Go
92
star
22

terraform-aws-couchbase

Reusable infrastructure modules for running Couchbase on AWS
HCL
92
star
23

gruntwork-installer

A script to make it easy to install Gruntwork Modules
Shell
92
star
24

terragrunt-action

A GitHub Action for installing and running Terragrunt
Shell
91
star
25

terraform-training-solutions

The solutions for the exercises in the Infrastructure as Code with Terraform Workshop
HCL
81
star
26

terraform-kubernetes-helm

Terraform code and scripts for deploying Helm Server (Helm v2) on a Kubernetes cluster. https://www.gruntwork.io
HCL
65
star
27

terraform-fake-modules

HCL
45
star
28

private-tls-cert

A simple Terraform module to generate self-signed TLS certificates for private use
HCL
43
star
29

terratest-helm-testing-example

Example Helm Chart and corresponding test code using terratest.
Go
42
star
30

gruntwork-io.github.io

The gruntwork.io website
HTML
41
star
31

terraform-google-static-assets

Modules for managing static assets (CSS, JS, images) in GCP
HCL
36
star
32

go-commons

A standard library to use in all Gruntwork CLI tools
Go
34
star
33

knowledge-base

Gruntwork Knowledge Base. You are more than welcomed to create questions and share knowledge with our community.
34
star
34

docs

Gruntwork docs files plus a set of tools to auto-generate a docs website from package markdown files.
JavaScript
26
star
35

terraform-google-ci

Terraform code and scripts for deploying automated CI/CD pipelines on GCP.
HCL
19
star
36

patcher-action

A GitHub Action for running Patcher, including setting up promotion workflows.
TypeScript
17
star
37

terraform-kubernetes-namespace

This repo contains a Module for managing Kubernetes Namespaces with Terraform.
HCL
17
star
38

tflint-ruleset-aws-cis

Tflint rules for CIS AWS Foundations Benchmark compliance checks. These rules work in addition to the recommendations from Gruntwork's CIS Service Catalog.
Go
11
star
39

helmcharts

Holds Gruntwork's public helm chart repository
6
star
40

sample-app-docker

Sample app for use with Google Cloud Build
JavaScript
6
star
41

terragrunt-engine-opentofu

Go
5
star
42

terraform-hiera-like-example

A repo that shows an example of how to deploy services dynamically from Hiera-like YAML files using Terraform/Terragrunt
HCL
2
star
43

module-ci-update-terraform-variable-test

This repo is used as part of the automated tests for the terraform-update-tests script in module-ci
HCL
2
star
44

pipelines-orchestrate

Shell
2
star
45

terragrunt-engine-go

Go
2
star
46

terraform-module-in-root-for-terragrunt-test

This repo is used during automated tests for Terragrunt. It is not meant for any production usage.
HCL
1
star
47

pipelines-dispatch

Shell
1
star
48

terraform-null-terragrunt-registry-test

HCL
1
star
49

legal

1
star
50

pipelines-aws-execute

1
star
51

pipelines-workflows

1
star
52

pipelines-baseline-account-action

1
star
53

website-comments

This repository captures all comments written in the guides
1
star
54

pipelines-provision-repo-action

1
star
55

fetch-test-public

A public repo meant solely for testing with gruntwork-io/fetch
1
star
56

pipelines-execute

Shell
1
star
57

pipelines-status-update

Shell
1
star
58

pipelines-provision-access-control-action

1
star
59

pipelines-baseline-child-account-action

1
star
60

pipelines-bootstrap

1
star
61

pipelines-preflight-action

1
star
62

pipelines-provision-account-action

1
star