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

From wikieduonline
Jump to navigation Jump to search
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{lc}}
 
 
* https://cloud.google.com/iam/docs/configuring-resource-based-access
 
* https://cloud.google.com/iam/docs/configuring-resource-based-access
 +
[[uniform bucket-level access]] required
  
 +
resource.type != 'compute.googleapis.com/Instance' ||
 +
  [[resource.name]].extract('/instances/{name}').startsWith('dev-')
  
  resource.type != 'compute.googleapis.com/Instance' ||
+
 
  resource.name.extract('/instances/{name}').startsWith('dev-')
+
Example from official documentation: <ref>https://cloud.google.com/iam/docs/conditions-overview</ref>
 +
  resource.type == "storage.googleapis.com/Bucket" &&
 +
    resource.name.startsWith("projects/_/buckets/exampleco-site-assets-")
  
  
 
== Related ==
 
== Related ==
 
* [[IAM Conditions]]
 
* [[IAM Conditions]]
* [[storage.objects.list]]
+
* <code>[[storage.objects.list]]</code>
 +
* [[Terraform startswith]]
  
 
== See also ==
 
== See also ==

Latest revision as of 10:01, 6 December 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[edit]

See also[edit]

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