-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
35 lines (30 loc) · 812 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
terraform {
backend "gcs" {
bucket = "lucasrod16-tfstate"
prefix = "osscontribute"
}
}
provider "google" {
project = "groovy-momentum-434802-g9"
region = "us-central1"
}
variable "image_digest" {
description = "The digest of the container image"
type = string
}
resource "google_cloud_run_v2_service" "oss_contribute" {
name = "oss-contribute"
location = "us-central1"
deletion_protection = false
template {
containers {
image = "lucasrod96/oss-contribute@${var.image_digest}"
}
}
}
resource "google_cloud_run_v2_service_iam_member" "noauth" {
name = google_cloud_run_v2_service.oss_contribute.name
location = google_cloud_run_v2_service.oss_contribute.location
role = "roles/run.invoker"
member = "allUsers"
}