Commit 9134a185 authored by Craig Furman's avatar Craig Furman

Upgrade gprd to terraform 0.12

parent 46c8883c
......@@ -7,7 +7,7 @@
resource "google_compute_firewall" "allow-dr-postgres" {
name = "allow-dr-postgres"
description = "Allows postgres traffic from our DR environment into gprd"
network = "${var.environment}"
network = var.environment
allow {
protocol = "tcp"
......@@ -38,20 +38,20 @@ resource "google_service_account" "dr-sa" {
resource "google_compute_network_peering" "peering-gitlab-analysis-default" {
name = "peering-gitlab-analysis-default"
network = "${var.network_env}"
network = var.network_env
peer_network = "https://www.googleapis.com/compute/v1/projects/gitlab-analysis/global/networks/default"
}
resource "google_compute_network_peering" "peering-gitlab-analysis-gitlab-analysis-vpc" {
name = "peering-gitlab-analysis-gitlab-analysis-vpc"
network = "${var.network_env}"
network = var.network_env
peer_network = "https://www.googleapis.com/compute/v1/projects/gitlab-analysis/global/networks/gitlab-analysis-vpc"
}
resource "google_compute_firewall" "allow-postgres-gitlab-analysis-default" {
name = "allow-postgres-gitlab-analysis-default"
description = "allow gitlab-analysis network default to access gprd network"
network = "${var.network_env}"
network = var.network_env
source_ranges = [
"10.52.0.0/14", # only from us-west1 default subnet
......@@ -70,7 +70,7 @@ resource "google_compute_firewall" "allow-postgres-gitlab-analysis-default" {
resource "google_compute_firewall" "allow-postgres-gitlab-analysis-gitlab-analysis-vpc" {
name = "allow-postgres-gitlab-analysis-gitlab-analysis-vpc"
description = "allow gitlab-analysis network gitlab-analysis-vpc to access gprd network"
network = "${var.network_env}"
network = var.network_env
source_ranges = [
"10.160.0.0/14", # only from us-west1 default subnet
......@@ -85,3 +85,4 @@ resource "google_compute_firewall" "allow-postgres-gitlab-analysis-gitlab-analys
ports = ["5432"]
}
}
......@@ -4,8 +4,8 @@
# services
resource "google_compute_url_map" "monitoring-lb" {
name = "${format("%v-monitoring-lb", var.environment)}"
default_service = "${module.prometheus.google_compute_backend_service_self_link}"
name = format("%v-monitoring-lb", var.environment)
default_service = module.prometheus.google_compute_backend_service_self_link
host_rule {
hosts = ["prometheus-app.gprd.gitlab.net"]
......@@ -14,11 +14,11 @@ resource "google_compute_url_map" "monitoring-lb" {
path_matcher {
name = "prometheus-app"
default_service = "${module.prometheus-app.google_compute_backend_service_self_link}"
default_service = module.prometheus-app.google_compute_backend_service_self_link
path_rule {
paths = ["/*"]
service = "${module.prometheus-app.google_compute_backend_service_self_link}"
service = module.prometheus-app.google_compute_backend_service_self_link
}
}
......@@ -29,11 +29,11 @@ resource "google_compute_url_map" "monitoring-lb" {
path_matcher {
name = "alerts"
default_service = "${module.alerts.google_compute_backend_service_self_link}"
default_service = module.alerts.google_compute_backend_service_self_link
path_rule {
paths = ["/*"]
service = "${module.alerts.google_compute_backend_service_self_link}"
service = module.alerts.google_compute_backend_service_self_link
}
}
......@@ -44,11 +44,11 @@ resource "google_compute_url_map" "monitoring-lb" {
path_matcher {
name = "prometheus"
default_service = "${module.prometheus.google_compute_backend_service_self_link}"
default_service = module.prometheus.google_compute_backend_service_self_link
path_rule {
paths = ["/*"]
service = "${module.prometheus.google_compute_backend_service_self_link}"
service = module.prometheus.google_compute_backend_service_self_link
}
}
......@@ -59,11 +59,12 @@ resource "google_compute_url_map" "monitoring-lb" {
path_matcher {
name = "prometheus-db"
default_service = "${module.prometheus-db.google_compute_backend_service_self_link}"
default_service = module.prometheus-db.google_compute_backend_service_self_link
path_rule {
paths = ["/*"]
service = "${module.prometheus-db.google_compute_backend_service_self_link}"
service = module.prometheus-db.google_compute_backend_service_self_link
}
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
terraform {
required_version = ">= 0.12"
}
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