I'm trying to add a policy binding using Google deployment manager to my service account using the below yaml file, but when I tried to deploy it, I'm getting the "Permission denied" Exception.
resources:
- name: test-name-deploy
type: gcp-types/iam-v1:projects.serviceAccounts
properties:
accountId: accid123
displayName: test-deploy
accessControl:
gcpIamPolicy:
bindings:
- role: roles/viewer
members:
- "serviceAccount:myservaccount"
> message: '{"ResourceType":"gcp-types/iam-v1:projects.serviceAccounts","ResourceErrorCode":"403","ResourceErrorMessage":{"code":403,"message":"Permission
iam.serviceAccounts.setIamPolicy is required to perform this operation on service
I have given "OWNER" permission for the account. Still I am getting the same. Thanks in advance.