Commit 34f183e2 authored by Craig Furman's avatar Craig Furman

Upgrade pre 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
This diff is collapsed.
......@@ -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.pre.gitlab.net"]
......@@ -14,11 +14,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
}
}
......@@ -30,11 +30,12 @@ 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
}
}
}
This diff is collapsed.
terraform {
required_version = ">= 0.12"
}
......@@ -5,67 +5,68 @@
#################################
resource "aws_route53_record" "puma" {
zone_id = "${var.gitlab_com_zone_id}"
zone_id = var.gitlab_com_zone_id
name = "pre-puma.gitlab.com"
type = "A"
ttl = "300"
records = ["${module.web-puma.instance_public_ips[0]}"]
records = [module.web-puma.instance_public_ips[0]]
}
resource "aws_route53_record" "puma-alt" {
zone_id = "${var.gitlab_com_zone_id}"
zone_id = var.gitlab_com_zone_id
name = "pre-puma-alt.gitlab.com"
type = "A"
ttl = "300"
records = ["${module.web-puma-alt.instance_public_ips[0]}"]
records = [module.web-puma-alt.instance_public_ips[0]]
}
module "web-puma" {
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
bootstrap_version = var.bootstrap_script_version
chef_provision = var.chef_provision
chef_run_list = "\"role[${var.environment}-base-fe-web-puma]\""
dns_zone_name = "${var.dns_zone_name}"
egress_ports = "${var.egress_ports}"
environment = "${var.environment}"
dns_zone_name = var.dns_zone_name
egress_ports = var.egress_ports
environment = var.environment
health_check = "tcp"
ip_cidr_range = "${var.subnetworks["web-puma"]}"
machine_type = "${var.machine_types["web"]}"
ip_cidr_range = var.subnetworks["web-puma"]
machine_type = var.machine_types["web"]
name = "web-puma"
node_count = 1
os_disk_type = "pd-ssd"
project = "${var.project}"
public_ports = "${var.public_ports["web-puma"]}"
region = "${var.region}"
service_account_email = "${var.service_account_email}"
project = var.project
public_ports = var.public_ports["web-puma"]
region = var.region
service_account_email = var.service_account_email
service_port = 443
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/generic-sv-with-group.git?ref=v1.0.5"
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/generic-sv-with-group.git?ref=v2.0.0"
tier = "sv"
use_new_node_name = true
use_external_ip = true
vpc = "${module.network.self_link}"
vpc = module.network.self_link
}
module "web-puma-alt" {
bootstrap_version = "${var.bootstrap_script_version}"
chef_provision = "${var.chef_provision}"
bootstrap_version = var.bootstrap_script_version
chef_provision = var.chef_provision
chef_run_list = "\"role[${var.environment}-base-fe-web-puma-alt]\""
dns_zone_name = "${var.dns_zone_name}"
egress_ports = "${var.egress_ports}"
environment = "${var.environment}"
dns_zone_name = var.dns_zone_name
egress_ports = var.egress_ports
environment = var.environment
health_check = "tcp"
subnetwork_name = "${module.web-puma.google_compute_subnetwork_name}"
machine_type = "${var.machine_types["web"]}"
subnetwork_name = module.web-puma.google_compute_subnetwork_name
machine_type = var.machine_types["web"]
name = "web-puma-alt"
node_count = 1
os_disk_type = "pd-ssd"
project = "${var.project}"
public_ports = "${var.public_ports["web-puma"]}"
region = "${var.region}"
service_account_email = "${var.service_account_email}"
project = var.project
public_ports = var.public_ports["web-puma"]
region = var.region
service_account_email = var.service_account_email
service_port = 443
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/generic-sv-with-group.git?ref=v1.0.5"
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/generic-sv-with-group.git?ref=v2.0.0"
tier = "sv"
use_new_node_name = true
use_external_ip = true
vpc = "${module.network.self_link}"
vpc = module.network.self_link
}
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