Coder Social home page Coder Social logo

terraform-gcp-vpc's Introduction

Google Cloud VPC

A Virtual Private Cloud (VPC) network is a virtual version of a physical network, implemented inside of Google's production network, using Andromeda. A VPC network provides the following:

  • Provides connectivity for your Compute Engine virtual machine (VM) instances, including Google Kubernetes Engine (GKE) clusters, App Engine flexible environment instances, and other Google Cloud products built on Compute Engine VMs.
  • Offers native Internal TCP/UDP Load Balancing and proxy systems for Internal HTTP(S) Load Balancing.
  • Connects to on-premises networks using Cloud VPN tunnels and Cloud Interconnect attachments.
  • Distributes traffic from Google Cloud external load balancers to backends.

Projects can contain multiple VPC networks. Unless you create an organizational policy that prohibits it, new projects start with a default network (an auto mode VPC network) that has one subnetwork (subnet) in each region.

Example

main.tf

terraform {
  required_version = ">= 0.11"
}

provider "google" {
  region      = "us-central1"
  project     = "${var.your_proj}"
  credentials = "${file("key.json")}"
}

module "vpc" {
  source          = "${var.module_url}"
  vpc_name        = "test_vpc_gcp"
  regions         = "${var.regions}"
  private_subnets = "${var.private_subnets}"
  public_subnets  = "${var.public_subnets}"
}

variables.tf

variable "regions" {
  default = ["us-central1", "asia-south1"]
}

variable "public_subnets" {
  default = ["10.255.123.0/24", "10.255.124.0/24"]
}

variable "private_subnets" {
  default = ["10.255.233.0/24", "10.255.243.0/24"]
}

terraform-gcp-vpc's People

Contributors

young-ook avatar

Stargazers

Donghyun Kang 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.