-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
57 lines (47 loc) · 1.1 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
# This file is used to initialize the deployment
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "4.51.0"
}
}
}
provider "google" {
project = "sandboxdsd"
}
resource "google_cloud_run_service" "frontend_service" {
name = "vuejs-template"
location = "europe-west9"
template {
spec {
containers {
image = "europe-docker.pkg.dev/sandboxdsd/cookiecutter-template/vuejs-template"
}
}
}
traffic {
percent = 100
latest_revision = true
}
}
data "google_iam_policy" "noauth" {
binding {
role = "roles/run.invoker"
members = [
"allUsers",
]
}
}
resource "google_cloud_run_service_iam_policy" "noauth" {
location = google_cloud_run_service.frontend_service.location
project = google_cloud_run_service.frontend_service.project
service = google_cloud_run_service.frontend_service.name
policy_data = data.google_iam_policy.noauth.policy_data
}
resource "google_secret_manager_secret" "frontend_secret" {
secret_id = "vuejs-template"
replication {
automatic = true
}
}