Commit 0709b147 authored by Craig Furman's avatar Craig Furman

Merge branch 'craigf/0.12upgrade-env-projects' into 'master'

Upgrade env-projects to Terraform 0.12

See merge request !1014
parents c3e0b410 4f0be522
......@@ -16,78 +16,114 @@ terraform {
// Create the projects
module "gitlab-dr" {
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/project.git?ref=v5.0.0"
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/project.git?ref=v6.0.0"
api_services = "${distinct(concat(local.api_services["common"], local.api_services["gitlab-dr"]))}"
billing_account = "${var.billing_account}"
api_services = distinct(
concat(
local.api_services["common"],
local.api_services["gitlab-dr"],
),
)
billing_account = var.billing_account
bucket_name_prefix = "donotuse"
project = "gitlab-dr"
project_folder = "${local.project_folder}"
project_folder = local.project_folder
use_name_as_id = "true"
}
module "gitlab-ops" {
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/project.git?ref=v5.0.0"
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/project.git?ref=v6.0.0"
api_services = "${distinct(concat(local.api_services["common"], local.api_services["gitlab-ops"]))}"
billing_account = "${var.billing_account}"
api_services = distinct(
concat(
local.api_services["common"],
local.api_services["gitlab-ops"],
),
)
billing_account = var.billing_account
bucket_name_prefix = "donotuse"
project = "gitlab-ops"
project_folder = "${local.top_level_project_folder}" // gitlab.com/Infrastructure
project_folder = local.top_level_project_folder // gitlab.com/Infrastructure
use_name_as_id = "true"
}
module "gitlab-pre" {
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/project.git?ref=v5.0.0"
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/project.git?ref=v6.0.0"
api_services = "${distinct(concat(local.api_services["common"], local.api_services["gitlab-pre"]))}"
billing_account = "${var.billing_account}"
api_services = distinct(
concat(
local.api_services["common"],
local.api_services["gitlab-pre"],
),
)
billing_account = var.billing_account
bucket_name_prefix = "donotuse"
project = "gitlab-pre"
project_folder = "${local.project_folder}"
project_folder = local.project_folder
use_name_as_id = "true"
}
module "gitlab-production" {
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/project.git?ref=v5.0.0"
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/project.git?ref=v6.0.0"
api_services = "${distinct(concat(local.api_services["common"], local.api_services["gitlab-production"]))}"
billing_account = "${var.billing_account}"
api_services = distinct(
concat(
local.api_services["common"],
local.api_services["gitlab-production"],
),
)
billing_account = var.billing_account
bucket_name_prefix = ""
project = "gitlab-production"
project_folder = "${local.project_folder}"
project_folder = local.project_folder
use_name_as_id = "true"
}
module "gitlab-staging" {
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/project.git?ref=v5.0.0"
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/project.git?ref=v6.0.0"
api_services = "${distinct(concat(local.api_services["common"], local.api_services["gitlab-staging"]))}"
billing_account = "${var.billing_account}"
api_services = distinct(
concat(
local.api_services["common"],
local.api_services["gitlab-staging"],
),
)
billing_account = var.billing_account
bucket_name_prefix = ""
project = "gitlab-staging"
project_id = "gitlab-staging-1"
project_folder = "${local.project_folder}"
project_folder = local.project_folder
}
module "gitlab-testbed" {
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/project.git?ref=v5.0.0"
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/project.git?ref=v6.0.0"
api_services = "${distinct(concat(local.api_services["common"], local.api_services["gitlab-testbed"]))}"
billing_account = "${var.billing_account}"
api_services = distinct(
concat(
local.api_services["common"],
local.api_services["gitlab-testbed"],
),
)
billing_account = var.billing_account
bucket_name_prefix = "donotuse"
project = "gitlab-testbed"
project_folder = "${local.project_folder}"
project_folder = local.project_folder
use_name_as_id = "true"
}
module "gitlab-ci" {
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/project.git?ref=v5.0.0"
source = "git::ssh://git@ops.gitlab.net/gitlab-com/gl-infra/terraform-modules/google/project.git?ref=v6.0.0"
api_services = "${distinct(concat(local.api_services["common"], local.api_services["gitlab-ci"]))}"
billing_account = "${var.billing_account}"
api_services = distinct(
concat(
local.api_services["common"],
local.api_services["gitlab-ci"],
),
)
billing_account = var.billing_account
bucket_name_prefix = "155816"
project = "gitlab-ci"
project_id = "gitlab-ci-155816"
project_folder = "${local.top_level_project_folder}"
project_folder = local.top_level_project_folder
}
// The billing account to assign the project to
variable "billing_account" {
type = "string"
type = string
description = "Billing account of the organization"
}
......@@ -29,7 +29,6 @@ locals {
"storage-api.googleapis.com",
"storage-component.googleapis.com",
]
gitlab-dr = [
"bigquerystorage.googleapis.com",
"bigtable.googleapis.com",
......@@ -46,7 +45,6 @@ locals {
"serviceusage.googleapis.com",
"sql-component.googleapis.com",
]
gitlab-ops = [
"cloudfunctions.googleapis.com",
"dataflow.googleapis.com",
......@@ -63,7 +61,6 @@ locals {
"stackdriver.googleapis.com",
"websecurityscanner.googleapis.com",
]
gitlab-production = [
"bigquerydatatransfer.googleapis.com",
"bigtable.googleapis.com",
......@@ -86,7 +83,6 @@ locals {
"sqladmin.googleapis.com",
"stackdriver.googleapis.com",
]
gitlab-pre = [
"deploymentmanager.googleapis.com",
"file.googleapis.com",
......@@ -102,7 +98,6 @@ locals {
"sql-component.googleapis.com",
"stackdriver.googleapis.com",
]
gitlab-staging = [
"bigtable.googleapis.com",
"bigtableadmin.googleapis.com",
......@@ -121,7 +116,6 @@ locals {
"sqladmin.googleapis.com",
"stackdriver.googleapis.com",
]
gitlab-testbed = [
"deploymentmanager.googleapis.com",
"file.googleapis.com",
......@@ -135,7 +129,6 @@ locals {
"serviceusage.googleapis.com",
"sql-component.googleapis.com",
]
gitlab-ci = [
"dataproc.googleapis.com",
"deploymentmanager.googleapis.com",
......@@ -153,3 +146,4 @@ locals {
project_folder = "626125638557" // gitlab.com/Infrastructure/Environments
top_level_project_folder = "690532272866"
}
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