Skip to content

Commit

Permalink
enable iam
Browse files Browse the repository at this point in the history
  • Loading branch information
ssickles committed May 10, 2023
1 parent e711255 commit 52d4906
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gcp.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@ data "google_compute_zones" "available" {}
locals {
project_id = data.google_compute_zones.available.project
available_zones = data.google_compute_zones.available.names
}

resource "google_project_service" "iam" {
service = "iam.googleapis.com"
disable_dependent_services = false
disable_on_destroy = false
}
2 changes: 2 additions & 0 deletions service-account.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
resource "google_service_account" "cluster" {
account_id = local.resource_name
display_name = "${local.resource_name} service account"

depends_on = [google_project_service.iam]
}

resource "google_project_iam_member" "cluster_base" {
Expand Down

0 comments on commit 52d4906

Please sign in to comment.