Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to provide conditional access to a service account on a project using DM #684

Open
sandyydk opened this issue May 6, 2022 · 1 comment

Comments

@sandyydk
Copy link

sandyydk commented May 6, 2022

I have the following yaml :

resources:
- name: bind-iam-policy-secret-accessor
  type: gcp-types/cloudresourcemanager-v1:virtual.projects.iamMemberBinding
  properties: 
    resource: myprojectA
    role: roles/secretmanager.secretAccessor
    member: "serviceAccount:sandeep@myproject.iam.gserviceaccount.com"

The above works out but the one below with a conditional access fails :

resources:
- name: bind-iam-policy-secret-accessor
  type: gcp-types/cloudresourcemanager-v1:virtual.projects.iamMemberBinding
  properties: 
    resource: myprojectA
    role: roles/secretmanager.secretAccessor
    member: "serviceAccount:sandeep@myproject.iam.gserviceaccount.com"
    condition: "resource.name.extract('/secrets/{name}').startsWith('sandeep-')"
@sandyydk
Copy link
Author

sandyydk commented May 6, 2022

Any idea how to specify a condition and its expression here? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant