Reputation: 358
I can see from documentation how to Sharing custom images publicly but it doesn't seem like it's possible to either grant public access to all images or at by family basis.
It seem something like that should've work but it didn't work:
gcloud projects add-iam-policy-binding project-id \
--member 'allAuthenticatedUsers' --role 'roles/compute.imageUser'
In my case I'd like to create a project specifically for image sharing across GCP platform for our customers without the need to add each one of them.
Upvotes: 0
Views: 255
Reputation: 81386
The command in your question is trying to grant the permission roles/compute.imageUser
to the project for allAuthenticatedUsers
. That specific authorization is not supported.
Instead grant the permission on the resource. Use the following command:
gcloud compute images add-iam-policy-binding <IMAGE> --member=allAuthenticatedUsers --role=roles/compute.imageUser
gcloud compute images add-iam-policy-binding
Upvotes: 1