iam_policy = {
"roles/compute.serviceAgent" = [
"serviceAccount:service-PROJECT_NUMBER@compute-system.iam.gserviceaccount.com"
],
"roles/editor" = [
"serviceAccount:PROJECT_NUMBER-compute@developer.gserviceaccount.com",
"serviceAccount:PROJECT_NUMBER@cloudservices.gserviceaccount.com",
],
"roles/owner" = [
"user:admin@example.com",
],
"roles/storage.admin" = [],
}
service_accounts = {
terraform = {
display_name = "Terraform Service Account"
roles = [
"roles/owner",
"roles/storage.admin",
]
},
}
In the example below, I needed to add
roles/storage.adminto theiam_policyin order to get it to add for theterraformservice account.