Build GCP IAM Conditions using Common Expression Language (CEL) with a guided form.
Last verified: April 2026
Access begins at this time (UTC)
Access expires at this time (UTC)
Output will appear here...GCP IAM Conditions allow you to grant permissions that are only effective when specific criteria are met — such as time of day, resource attributes, or request attributes. Conditions use the Common Expression Language (CEL), which has its own syntax for logical operators, string functions, and timestamp comparisons that can be tricky to write correctly. This builder provides a guided form that generates valid CEL expressions for common patterns like restricting access to specific resource types, enforcing time-based access windows, or limiting permissions to resources with certain labels.
A contractor needs temporary Compute Engine admin access for a 2-week migration project, but only during business hours (9am-6pm EST, weekdays only). Instead of creating and revoking IAM bindings daily, you use the builder to generate a CEL expression that combines a date range (request.time >= timestamp('2026-04-07T00:00:00Z') && request.time < timestamp('2026-04-21T00:00:00Z')) with day-of-week and hour-of-day checks. Access automatically expires without any manual cleanup.
Time-based conditions use UTC timestamps, not your local timezone. A condition like request.time < timestamp('2026-04-15T17:00:00Z') expires at 5pm UTC, which is 10am Pacific. This catches teams every time they set a maintenance window condition in their local time and wonder why access was revoked 7 hours early.
CEL expressions have a maximum length of 12,288 characters. If your condition combines many resource type checks or label comparisons, you can hit this limit. Break complex conditions into separate role bindings with simpler conditions rather than packing everything into one expression.
Not all IAM roles support conditions. Primitive roles (Owner, Editor, Viewer) and some pre-defined roles cannot have conditions applied. If the API rejects your condition, check whether the role has the iam.conditions.* permissions. Custom roles always support conditions.
The builder constructs CEL expressions by combining field access paths (request.time, resource.type, resource.name, resource.labels) with comparison operators and literal values. For time-based conditions, it generates timestamp() function calls with RFC 3339 formatted strings. For resource conditions, it uses string matching functions like startsWith(), endsWith(), and matches(). The generated expression is validated against CEL grammar rules before output.
Was this tool helpful?
Disclaimer: This tool runs entirely in your browser. No data is sent to our servers. Always verify outputs before using them in production. AWS, Azure, and GCP are trademarks of their respective owners.