forked from vmware-archive/terraforming-gcp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iam.tf
34 lines (29 loc) · 1.27 KB
/
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
32
33
34
resource "google_service_account" "opsman_service_account" {
account_id = "${var.env_name}-opsman"
display_name = "${var.env_name} Ops Manager VM Service Account"
}
resource "google_project_iam_member" "opsman_iam_service_account_actor" {
project = "${var.project}"
role = "roles/iam.serviceAccountActor"
member = "serviceAccount:${google_service_account.opsman_service_account.email}",
}
resource "google_project_iam_member" "opsman_compute_instance_admin" {
project = "${var.project}"
role = "roles/compute.instanceAdmin"
member = "serviceAccount:${google_service_account.opsman_service_account.email}",
}
resource "google_project_iam_member" "opsman_compute_network_admin" {
project = "${var.project}"
role = "roles/compute.networkAdmin"
member = "serviceAccount:${google_service_account.opsman_service_account.email}",
}
resource "google_project_iam_member" "opsman_compute_storage_admin" {
project = "${var.project}"
role = "roles/compute.storageAdmin"
member = "serviceAccount:${google_service_account.opsman_service_account.email}",
}
resource "google_project_iam_member" "opsman_storage_admin" {
project = "${var.project}"
role = "roles/storage.admin"
member = "serviceAccount:${google_service_account.opsman_service_account.email}",
}