Regions
A resource type such as an S3 bucket, EC2 instance, or VPC has three distinct regional attributes in Guardrails:
- Available: The regions where the resource type is offered by the cloud provider.
- Discovery: The regions where Guardrails will discover resources and add them to the CMDB. Controlled via
RegionsandService > Enabledpolicies. - Allowed / Approved: The regions where Guardrails permits resources to exist. Resources outside allowed regions generate alarms or are remediated, depending on the enforcement policy.
From a Guardrails perspective, a region can be configured in two ways:
- Set a region as Enabled or Disabled. Disabling a region stops all resource discovery and remediation, and prevents user actions via IAM policies.
- If a region is Enabled, set policies to Allow or Approve a subset of regions. Resources in non-allowed regions generate alarms or are remediated.
[!IMPORTANT] A region can be discovered (enabled) while also being not allowed/approved for use. This lets you discover all regions for visibility while only permitting resources in a subset of regions.
Regional Availability
Regions are defined by the cloud provider:
[!NOTE] Even though a region exists, certain services may not be available there. Before enabling a region for a specific service, verify that the cloud provider offers the service in that region.
Provider-Specific Region Policies
| Provider | Region Policy | Notes |
|---|---|---|
| AWS | AWS > Account > Regions [Default] | YAML list of regions. Wildcard (*) supported. |
| GCP | GCP > Project > Regions [Default] | YAML list of regions. Wildcard (*) supported. |
| Azure | Azure > Account > Regions [Default] | YAML list of regions. Azure has no region resource type. Discovery targets Resource Groups instead. |
Discovery
Guardrails discovers resources in enabled regions and populates the CMDB with their metadata. Any region that is NOT discovered will NOT exist in the CMDB, and Guardrails cannot manage resources in undiscovered regions.
[!NOTE] Custom permissions on the Guardrails IAM role can affect resource discoverability. A resource may show as existing but contain no metadata if the IAM role lacks describe permissions.
Discovery Controls
If a region and service are enabled, resources are discovered automatically. Region discovery is managed by controls that target the account or project:
| Provider | Discovery Control | Region Policy |
|---|---|---|
| AWS | AWS > Region > Discovery | AWS > Account > Regions |
| GCP | GCP > Region > Discovery | GCP > Project > Regions |
| GCP | GCP > Multi-Region > Discovery | GCP > Project > Regions |
The default value for these policies contains all discoverable regions.
Allowed and Approved Regions
Guardrails has two sets of regional controls: the newer Allowed controls and the older Approved controls. Both restrict which regions resources can exist in, but they use separate policy hierarchies.
Allowed > Region (Newer)
The Allowed > Region policy is part of the newer Allowed control family. Resource types that have been migrated to the Allowed pattern have these policies:
{Service} > {Resource} > Allowed > Region: The control that evaluates whether the resource is in an allowed region.{Service} > {Resource} > Allowed > Region > Regions: The list of allowed regions.
For example:
AWS > S3 > Bucket > Allowed > RegionAWS > S3 > Bucket > Allowed > Region > Regions
[!NOTE] Not all resource types have migrated to the Allowed pattern yet. Many AWS services (including EC2), most Azure resources, and GCP resources still use only the Approved Regions policies. Check the specific resource type's policies to see which is available.
Approved > Regions (Older)
The Approved > Regions policy hierarchy uses a cascading default pattern:
-
Provider-level default: Sets the baseline for all resource types in the provider.
AWS > Account > Approved Regions [Default]GCP > Project > Approved Regions [Default]Azure > Subscription > Approved Regions [Default]
-
Service-level default: Inherits from the provider default. Override to restrict a specific service.
AWS > S3 > Approved Regions [Default]AWS > EC2 > Approved Regions [Default]AWS > SNS > Approved Regions [Default]
-
Resource-level policy: Used by the Approved control to evaluate individual resources. Inherits from the service default.
AWS > EC2 > Instance > Approved > RegionsAWS > EC2 > Volume > Approved > RegionsAWS > EC2 > Snapshot > Approved > Regions
All Approved Regions policies accept a YAML list of regions and support the wildcard operator (*).
Due to the cascading default pattern, you can set regional restrictions with just a few policies:
- Set
AWS > Account > Approved Regions [Default]to limit all AWS resources to specific regions. - Override at the service level with
AWS > EC2 > Approved Regions [Default]to further restrict EC2. - Override for a single resource type with
AWS > EC2 > Snapshot > Approved > Regions.
Example AWS Scenarios
Discover and allow everything in all regions
Do nothing. Guardrails enables all regions in the AWS > Account > Regions policy by default, which cascades to everything else.
Discover everywhere, only allow specific regions for use
- Use the default for
AWS > Account > Regions. All regions will be discovered. - Edit
AWS > Account > Approved Regions [Default]to list only your allowed regions. The defaults cascade to all service and resource approved policies. Resources outside approved regions will be flagged as Not Approved.
Only discover and allow specific regions
- Edit
AWS > Account > Regionsto list only the regions you want. Regions not listed here will not be discovered, will not appear in the boundary policy, and Guardrails will not manage resources there.
Discover all regions but only allow EC2 in US East 1
- Leave the default for
AWS > Account > Regions(all regions discovered). - Leave the default for
AWS > Account > Approved Regions [Default](inherits from Regions). - Set
AWS > EC2 > Approved Regions [Default]to- us-east-1.