Simple bucket example fails - no such role storage.viewer
black-snow opened this issue · 1 comments
black-snow commented
This samples https://registry.terraform.io/modules/terraform-google-modules/cloud-storage/google/latest/examples/simple_bucket fails to create the IAM-related things.
Please refer to my original issue here: hashicorp/terraform-provider-google#9130
The issue seems to be that there is no role storage.viewer
by default. See https://github.com/terraform-google-modules/terraform-google-cloud-storage/blob/v1.7.2/examples/simple_bucket/main.tf#L35
There's only roles/storage.admin
.
morgante commented
It looks like the correct role would probably be roles/storage.objectViewer
.