2022-01-03 19:36:51 +03:00
|
|
|
# Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
2019-04-04 11:33:38 +03:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
terraform {
|
|
|
|
backend "gcs" {
|
|
|
|
bucket = "da-dev-gcp-daml-language-tfstate"
|
|
|
|
prefix = "daml"
|
|
|
|
}
|
2022-01-31 17:46:59 +03:00
|
|
|
|
|
|
|
required_providers {
|
|
|
|
secret = {
|
|
|
|
source = "numtide/secret"
|
|
|
|
version = "1.2.0"
|
|
|
|
}
|
|
|
|
google = {
|
|
|
|
source = "hashicorp/google"
|
2022-02-22 21:33:21 +03:00
|
|
|
version = "4.9.0"
|
2022-01-31 17:46:59 +03:00
|
|
|
}
|
|
|
|
google-beta = {
|
|
|
|
source = "hashicorp/google-beta"
|
2022-02-22 21:33:21 +03:00
|
|
|
version = "4.9.0"
|
2022-01-31 17:46:59 +03:00
|
|
|
}
|
|
|
|
template = {
|
|
|
|
source = "hashicorp/template"
|
|
|
|
version = "2.2.0"
|
|
|
|
}
|
|
|
|
}
|
2019-04-04 11:33:38 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
provider "google" {
|
|
|
|
project = "da-dev-gcp-daml-language"
|
2021-07-08 20:20:35 +03:00
|
|
|
region = local.region
|
|
|
|
zone = local.zone
|
2019-04-04 11:33:38 +03:00
|
|
|
}
|
|
|
|
|
2019-04-09 19:59:37 +03:00
|
|
|
provider "google-beta" {
|
|
|
|
project = "da-dev-gcp-daml-language"
|
2021-07-08 20:20:35 +03:00
|
|
|
region = local.region
|
|
|
|
zone = local.zone
|
2020-02-14 15:52:27 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
provider "secret" {
|
|
|
|
}
|
|
|
|
|
|
|
|
provider "template" {
|
2019-04-09 19:59:37 +03:00
|
|
|
}
|
|
|
|
|
2019-07-04 14:23:51 +03:00
|
|
|
data "google_project" "current" {
|
2021-02-08 20:25:04 +03:00
|
|
|
project_id = local.project
|
2019-07-04 14:23:51 +03:00
|
|
|
}
|
|
|
|
|
2019-04-04 11:33:38 +03:00
|
|
|
locals {
|
|
|
|
labels = {
|
|
|
|
cost-allocation = "daml-language"
|
|
|
|
host-group = "buildpipeline"
|
|
|
|
infra-owner = "daml-language"
|
|
|
|
managed = "true"
|
2021-02-08 20:25:04 +03:00
|
|
|
target = "infra"
|
2019-04-04 11:33:38 +03:00
|
|
|
}
|
|
|
|
|
2022-01-31 17:46:59 +03:00
|
|
|
machine-labels = merge(local.labels, tomap({ "env" = "production" }))
|
2020-12-03 03:55:43 +03:00
|
|
|
|
2019-04-04 11:33:38 +03:00
|
|
|
project = "da-dev-gcp-daml-language"
|
|
|
|
region = "us-east4"
|
|
|
|
zone = "us-east4-a"
|
|
|
|
|
2021-02-08 20:25:04 +03:00
|
|
|
ssl_certificate_hoogle = "https://www.googleapis.com/compute/v1/projects/da-dev-gcp-daml-language/global/sslCertificates/hoogle-google-cert"
|
2019-04-04 11:33:38 +03:00
|
|
|
}
|
2021-01-27 19:38:34 +03:00
|
|
|
|
|
|
|
resource "secret_resource" "vsts-token" {}
|
2022-06-21 17:37:24 +03:00
|
|
|
|
|
|
|
resource "google_compute_ssl_policy" "ssl_policy" {
|
|
|
|
name = "ssl-policy"
|
|
|
|
profile = "MODERN"
|
|
|
|
min_tls_version = "TLS_1_2"
|
|
|
|
}
|