# Custom constraint

Facts read 10 Nov 2026. Page reviewed 16 Nov 2026.

A Google Cloud constraint written by your organization, in a YAML file that names the resources, methods, conditions and actions it applies to. It covers cases that Google-managed constraints do not, within the services that support it. It is created and maintained by you.

## An example, sourced

Google documents that with custom organization policies you can customize control over the specific fields your organization restricts. "A custom constraint is defined in a YAML file, which specifies the resources, methods, conditions, and actions that are subject to the constraint." Behavior and supported parameters are specific to each service, and a constraint ID must start with custom. Google lists the services that support custom constraints on a separate page.

## Why it matters here

Custom constraints let you express a rule the managed set lacks. They are supported in dry-run mode and in Policy Simulator, so they can be tested before they bind. A custom constraint lets you express a rule the managed set lacks. It can be tested before enforcement, so build the test into the change process.

## Related pages

- [Dry-run mode: meaning and an example](/glossary/dry-run-mode/)
- [IAM deny policy: meaning and an example](/glossary/iam-deny-policy/)
- [VPC Service Controls perimeter: meaning and an example](/glossary/vpc-service-controls-perimeter/)
- [All of them](/glossary/)

## Sources

- https://cloud.google.com/resource-manager/docs/organization-policy/creating-managing-custom-constraints (read 10 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://cloudgovernancetools.com/glossary/custom-constraint/
