Created
May 20, 2021 05:03
-
-
Save calum-github/a0b90815ef53f1b509a64976e7248014 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Define the required roles to access the VM | |
locals { | |
compute_roles = [ | |
"roles/compute.viewer", | |
"roles/compute.osLogin", | |
] | |
} | |
# Apply the roles to a user account | |
resource "google_project_iam_member" "assign-roles" { | |
count = length(local.compute_roles) | |
project = var.project_id | |
role = local.roles[count.index] | |
member = "user:[email protected]" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment