Commit bd04df72 authored by Craig Furman's avatar Craig Furman

Upgrade gstg to Terraform 0.12

Bring in bumped modules. Major versions can be bumped with:

`perl -i -pe 's/([\w\-]+\.git\?ref=v)(\d+)\.\d+.\d+/${1}.(${2}+1).".0.0"/e' main.tf`

I then ran `tfenv use latest`, which automatically bumps
`.terraform-version`. I then ran `tf init && 0.12upgrade`, after which a
subsequent `tf init && tf plan` will display the final errors to work
through.
parent 46c8883c
......@@ -6,20 +6,20 @@
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 gstg network"
network = "${var.network_env}"
network = var.network_env
source_ranges = [
"10.52.0.0/14", # only from us-west-1 default subnet
......@@ -38,7 +38,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 gstg network"
network = "${var.network_env}"
network = var.network_env
source_ranges = [
"10.160.0.0/14", # only from us-west-1 default subnet
......@@ -53,3 +53,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
###################################
......@@ -15,11 +15,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
}
}
......@@ -31,11 +31,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
}
}
......@@ -47,11 +47,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