-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
62 lines (55 loc) · 1.14 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
variable "project" {
type = string
description = "The GCP project to deploy to"
}
terraform {
required_version = "= 1.5.7"
required_providers {
docker = {
source = "kreuzwerker/docker"
version = "= 3.0.1"
}
github = {
source = "integrations/github"
version = "= 6.2.1"
}
google = {
source = "hashicorp/google"
version = "= 6.15.0"
}
}
backend "gcs" {
bucket = "libops-ghat-terraform"
prefix = "/github"
}
}
provider "google" {
alias = "default"
project = var.project
}
provider "docker" {
alias = "local"
registry_auth {
address = "us-docker.pkg.dev"
config_file = pathexpand("~/.docker/config.json")
}
}
module "ghat" {
source = "./modules/cloudrun"
name = "ghat"
project = var.project
containers = tolist([
{
name = "ghat",
image = "us-docker.pkg.dev/${var.project}/private/ghat:main",
port = 8080
liveness_probe = "/healthcheck"
memory = "512Mi"
cpu = "1000m"
}
])
providers = {
google = google.default
docker = docker.local
}
}