Skip to content

Commit

Permalink
fix: use non authoritative iam perms (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexouzounis authored Feb 28, 2020
1 parent 68716cc commit 8a7c2ac
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -155,21 +155,16 @@ resource "google_service_account" "preemptible_killer" {
}

### Set IAM for preemptible-killer to zap nodes
resource "google_project_iam_binding" "preemptible_killer_compute_admin" {
role = "roles/compute.admin"
members = [
"serviceAccount:${google_service_account.preemptible_killer.email}",
]
resource "google_project_iam_member" "preemptible_killer_compute_admin" {
role = "roles/compute.admin"
member = "serviceAccount:${google_service_account.preemptible_killer.email}"
}

### Set IAM for preemptible-killer to zap nodes
resource "google_project_iam_binding" "preemptible_killer_container_admin" {
role = "roles/container.admin"
members = [
"serviceAccount:${google_service_account.preemptible_killer.email}",
]
resource "google_project_iam_member" "preemptible_killer_container_admin" {
role = "roles/container.admin"
member = "serviceAccount:${google_service_account.preemptible_killer.email}"
}

### Key for the Preemptible killer Service Account
resource "google_service_account_key" "preemptible_killer" {
service_account_id = google_service_account.preemptible_killer.name
Expand Down

0 comments on commit 8a7c2ac

Please sign in to comment.