forked from mirakl/terraform-google-gcr-cleaner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsa.tf
15 lines (14 loc) · 717 Bytes
/
sa.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Create a service account which will be assigned to the Cloud Run service
resource "google_service_account" "cleaner" {
# The account_id has to respect this regex: "^[a-z](?:[-a-z0-9]{4,28}[a-z0-9])$"
account_id = "gcr-cleaner-sa-id"
display_name = "GCR Cleaner Service Account"
description = "It will be assigned to the Cloud Run service"
}
# Create a service account with permission to invoke the Cloud Run service
resource "google_service_account" "invoker" {
# The account_id has to respect this regex: "^[a-z](?:[-a-z0-9]{4,28}[a-z0-9])$"
account_id = "gcr-cleaner-invoker-sa-id"
display_name = "GCR Cleaner Invoker Service Account"
description = "It will invoke the Cloud Run service"
}