Hello All,
I am using below code for the ‘Assigning multiple roles to the single custom service account in GCP’
data “google_iam_policy” “admin” {
binding {
role = “roles/bigquery.dataEditor”
members = [
“serviceAccount: ${google_service_account.sa.email}”,
]
}
}
resource “google_service_account” “sa” {
account_id = “etl-serviceaccount-id”
display_name = “A custom service account”
}
resource “google_service_account_iam_policy” “admin-account-iam” {
service_account_id = google_service_account.sa.name
policy_data = data.google_iam_policy.admin.policy_data
}
But I am getting below error, please help me in this, thank you so much in advance for the help:
Error: Error setting IAM policy for service account ‘projects/pune-powerhouse-etl/serviceAccounts/etl-serviceaccount-id@pune-powerhouse-etl.iam.gserviceaccount.com’: googleapi: Error 400: Role roles/bigquery.dataEditor is not supported for this resource., badRequest