-
Notifications
You must be signed in to change notification settings - Fork 0
/
iam.tf
31 lines (24 loc) · 876 Bytes
/
iam.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
resource "google_service_account" "terraform" {
account_id = "terraform"
display_name = "Terraform SA"
}
resource "google_service_account" "circleci_deploy" {
account_id = "circleci-deploy"
display_name = "CircleCI Deploy SA"
}
resource "google_service_account" "forests_cloud_run" {
account_id = "forests"
display_name = "Forests Cloud run SA"
}
resource "google_project_iam_member" "terraform_owner" {
role = "roles/owner"
member = "serviceAccount:${google_service_account.terraform.email}"
}
resource "google_project_iam_member" "circleci_deploy_registry" {
role = "roles/storage.admin"
member = "serviceAccount:${google_service_account.circleci_deploy.email}"
}
resource "google_project_iam_member" "cloud_sql_client" {
role = "roles/cloudsql.client"
member = "serviceAccount:${google_service_account.forests_cloud_run.email}"
}