Difference between revisions of "GCP: Resource.name.startsWith"

From wikieduonline
Jump to navigation Jump to search
Line 15: Line 15:
 
* [[IAM Conditions]]
 
* [[IAM Conditions]]
 
* <code>[[storage.objects.list]]</code>
 
* <code>[[storage.objects.list]]</code>
 +
* [[Terraform startswith]]
  
 
== See also ==
 
== See also ==

Revision as of 17:44, 12 September 2022

uniform bucket-level access required

resource.type != 'compute.googleapis.com/Instance' ||
  resource.name.extract('/instances/{name}').startsWith('dev-')


Example from official documentation: [1]

resource.type == "storage.googleapis.com/Bucket" &&
   resource.name.startsWith("projects/_/buckets/exampleco-site-assets-")


Related

See also

  • https://cloud.google.com/iam/docs/conditions-overview
  • Advertising: