- I cannot get my head around what is the difference between both. add-iam-policy-binding is binding a policy (defined in a role, including custom role) to an iam user (user, service account, group) for a project.
get-iam-policy/set-iam-policy also does the same following the read-modify-write pattern.
So, what is the basic difference between both. When to use one over other?
I have been reading - https://cloud.google.com/iam/docs/overview#permissions
what permissions are required to run these commands? I get permissions error for add-iam-policy-binding but get/set-iam-policy works fine using a serviceaccount.
Once I understand it, objective is to create a group, add user to it. To assign permissions to group, create a role and add binding with project. Here, I am not sure how creating a role binding would give access to group? Also how to achieve the later part?
Thanks