daml/infra/main.tf
Gary Verhaegen c8e6486c79
pin Terraform plugin versions (#4519)
We're currently depending on a floating "latest", which is often a bad
idea. Today my machine decided to upgrade the google plugin,w hich is no
specifying some new fields for the GCS objects, and therefore `terraform
plan` doe snot look clean anymore, even though there has been no change
to the terraform files (nor to the infrastructure).

This PR aims to make our Terraform setup more reproducible by pinning
Terraform plugin versions. It's also a way to track the application of
the "new" Terraform setup, as it is technically a standard change
(though hopefully a very safe one).

CHANGELOG_BEGIN
CHANGELOG_END
2020-02-14 13:52:27 +01:00

55 lines
1.2 KiB
HCL

# Copyright (c) 2020 The DAML Authors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
terraform {
backend "gcs" {
bucket = "da-dev-gcp-daml-language-tfstate"
prefix = "daml"
}
}
provider "google" {
project = "da-dev-gcp-daml-language"
region = "us-east4"
version = "3.5"
}
provider "google-beta" {
project = "da-dev-gcp-daml-language"
region = "us-east4"
version = "3.5"
}
provider "secret" {
version = "1.1"
}
provider "template" {
version = "2.1.2"
}
data "google_project" "current" {
project_id = "${local.project}"
}
locals {
labels = {
cost-allocation = "daml-language"
host-group = "buildpipeline"
infra-owner = "daml-language"
managed = "true"
# default the target name to be the name of the folder
target = "${basename(path.module)}"
}
project = "da-dev-gcp-daml-language"
region = "us-east4"
zone = "us-east4-a"
// maintained by DA security
ssl_certificate = "https://www.googleapis.com/compute/v1/projects/da-dev-gcp-daml-language/global/sslCertificates/da-ext-wildcard"
ssl_certificate_hoogle = "https://www.googleapis.com/compute/v1/projects/da-dev-gcp-daml-language/global/sslCertificates/daml-lang-hoogle-app-service-https-cert"
}