The GCP docs generally list necessary permissions. For example the private service access docs state the servicenetworking.services.addPeering
permission is needed, but doesn't mention which role has this permission.
Use this script to find the roles which grant a specific permission.
gcloud iam roles list '--format=value(name)' > roles.lst
xargs -n1 gcloud iam roles describe --format=json < roles.lst | tee roles.all
Then find the roles:
PERMISSION="servicenetworking.services.addPeering"
jq -rc 'select(.includedPermissions[]? | contains("'"${PERMISSION}"'")) | .name' roles.all | sort -u
Output:
roles/cloudtpu.serviceAgent
roles/composer.serviceAgent
roles/compute.networkAdmin
roles/container.serviceAgent
roles/dataflow.serviceAgent
roles/owner