-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support non-primitive roles on BigQuery datasets #3206
Comments
Hi @rolandkool, I'm taking a look at the docs at https://cloud.google.com/bigquery/docs/access-control and it seems to me like the only ones that are applied at the dataset level are the primitive roles, and that others would be project or organization level IAM. This also aligns with the description in the API at https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets:
Are you seeing other docs that imply it can be done differently? |
Hi @danawillow . |
The difference between Terraform checking and the API checking is that Terraform can check at plan-time, which means if someone made a typo they can find out before they actually run Terraform, which is really helpful for large configurations with chained dependencies. Using your patch, if you run Terraform with a non-primitive role set, and then run |
actually using this json as source to bq update works fine : "access": [
{
"role": "WRITER",
"specialGroup": "projectWriters"
},
{
"role": "OWNER",
"specialGroup": "projectOwners"
},
{
"role": "OWNER",
"userByEmail": "[email protected]"
},
{
"role": "READER",
"specialGroup": "projectReaders"
},
{
"role": "projects/myproject/roles/CustomBigQueryDataViewer",
"userByEmail": "[email protected]"
}
]
...
i get this : I think that removing the string validation on roles will work perfectly : https://github.com/terraform-providers/terraform-provider-google/blob/master/google/resource_bigquery_dataset.go#L143 |
pretty sure that removing the validation will work
|
i was going to do the PR when i saw that @danawillow did it before me 😢 👍 good job |
Great, thanks for the info on custom roles! I'll comment again on the PR. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
Description
BigQuery datasets have an access property to configure permissions on datasets. Currently, terraform has three primitive roles hardcoded. However, recently it became possible to apply non-primitive roles, like custom roles, on datasets. Terraform should support this.
New or Affected Resource(s)
Potential Terraform Configuration
References
Maybe related to #2051
The text was updated successfully, but these errors were encountered: