generated from syntapy/gcp_project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
46 lines (39 loc) · 889 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
terraform {
required_version = ">= 1.0"
required_providers {
google = {
source = "hashicorp/google"
version = ">= 3.75"
}
random = {
source = "hashicorp/random"
version = ">= 3.1"
}
}
}
module "project" {
source = "./project"
billing_account = var.billing_account
org_id = var.org_id
project_name = var.project_name
region = var.region
rng_seed = var.rng_seed
}
locals {
project_id = split("/", module.project.id)[1]
}
module "apis" {
source = "./apis"
project_id = local.project_id
region = var.region
}
module "build" {
source = "./build"
region = var.region
zone_letter = var.zone_letter
project_name = module.project.name
project_number = module.project.number
project_id = local.project_id
sourcerepo_service = module.apis.sourcerepo_service
cloudbuild_service = module.apis.cloudbuild_service
}