Commit 8a2957c3 authored by Daniele Valeriani's avatar Daniele Valeriani

Add two frontend load balancers

parent 76c7d17f
......@@ -14,9 +14,9 @@ variable "gitlab_net_zone_id" {}
## Google
provider "google" {
credentials = "${file("../../private/google-credentials/${var.environment}.json")}"
project = "${var.project}"
region = "${var.region}"
# credentials = "${file("../../private/google-credentials/${var.environment}.json")}"
project = "${var.project}"
region = "${var.region}"
}
##################################
......@@ -80,7 +80,7 @@ module "web" {
public_ports = "${var.public_ports["web"]}"
region = "${var.region}"
source = "../../modules/google/generic-pet"
tier = "fe"
tier = "sv"
vpc = "${module.network.self_link}"
}
......@@ -392,18 +392,18 @@ module "artifacts" {
#
##################################
module "external-lb" {
module "fe-lb" {
attach_data_disk = false
chef_provision = "${var.chef_provision}"
chef_run_list = "${var.base_chef_run_list}"
dns_zone_name = "${var.dns_zone_name}"
environment = "${var.environment}"
ip_cidr_range = "${var.subnetworks["exlb"]}"
machine_type = "${var.machine_types["exlb"]}"
name = "ext"
node_count = "${var.node_count["exlb"]}"
ip_cidr_range = "${var.subnetworks["fe-lb"]}"
machine_type = "${var.machine_types["fe-lb"]}"
name = "fe"
node_count = "${var.node_count["fe-lb"]}"
project = "${var.project}"
public_ports = "${var.public_ports["exlb"]}"
public_ports = "${var.public_ports["fe-lb"]}"
region = "${var.region}"
source = "../../modules/google/generic-pet"
tier = "lb"
......@@ -414,9 +414,9 @@ module "google_load_balancers" {
source = "./load-balancers"
project = "${var.project}"
region = "${var.region}"
fe_http_instances = "${module.external-lb.instances_without_attached_disk_self_link}"
fe_https_instances = "${module.external-lb.instances_without_attached_disk_self_link}"
fe_ssh_instances = "${module.external-lb.instances_without_attached_disk_self_link}"
fe_http_instances = "${module.fe-lb.instances_without_attached_disk_self_link}"
fe_https_instances = "${module.fe-lb.instances_without_attached_disk_self_link}"
fe_ssh_instances = "${module.fe-lb.instances_without_attached_disk_self_link}"
}
##################################
......
......@@ -13,7 +13,7 @@ variable "public_ports" {
"api" = [22]
"db" = [22]
"pgb" = [22]
"exlb" = [22]
"fe-lb" = [22, 80, 443, 2222]
"geodb" = [22]
"git" = [22]
"redis" = [22]
......@@ -59,7 +59,7 @@ variable "machine_types" {
"api" = "n1-standard-8"
"db" = "n1-highmem-32"
"pgb" = "n1-standard-4"
"exlb" = "n1-standard-4"
"fe-lb" = "n1-standard-4"
"geodb" = "n1-highmem-32"
"git" = "n1-standard-16"
"redis" = "n1-highmem-2"
......@@ -77,7 +77,7 @@ variable "node_count" {
"api" = 1
"db" = 1
"pgb" = 1
"exlb" = 1
"fe-lb" = 2
"geodb" = 1
"git" = 1
"redis" = 1
......@@ -98,7 +98,7 @@ variable "subnetworks" {
default = {
"api" = "10.220.2.0/23"
"db" = "10.217.1.0/24"
"exlb" = "10.216.1.0/24"
"fe-lb" = "10.216.1.0/24"
"geodb" = "10.217.6.0/24"
"git" = "10.220.4.0/23"
"pgb" = "10.217.4.0/24"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment