WAF-SOV-020 – Region Pinning Enforced (IaC)
Description
Deployments MUST be restricted to permitted sovereign regions through policy-as-code and IaC guardrails. Region constraints must be technically enforced — not merely documented.
Violations MUST be blocked in CI or immediately reported as critical policy exceptions. Every approved exception requires documented approval with a time limit.
Rationale
Documentation alone cannot prevent accidental or intentional deployments into non-sovereign regions. A single unsecured provider configuration or environment variable can silently create workloads outside jurisdictional boundaries.
Region pinning must be enforced on every layer:
-
IaC level: Variable validation in Terraform
-
CI/CD level: OPA/Sentinel policy gate in the build
-
Organization level: SCP / Azure Policy / GCP Org Policy as the last safety net
Threat Context
| Risk | Description |
|---|---|
Accidental deployment |
Wrong |
Shadow infrastructure |
Developer account without SCP guardrails enables deployments to arbitrary regions. |
Provider default fallback |
Missing |
Terraform state leak |
State file with sensitive metadata stored in an S3 bucket outside the approved region. |
Regulatory Mapping
| Framework | Controls |
|---|---|
GDPR |
Art. 44 – General principle for transfers; Art. 46 – Appropriate safeguards |
BSI C5:2020 |
OPS-04 – Data management; INF-01 – Physical location of infrastructure |
EUCS (ENISA) |
SOV-01 – Data location; SOV-02 – Jurisdictional control |
GAIA-X |
Sovereign Cloud – Location transparency and data location |
ISO 27001:2022 |
A.8.10 – Information deletion; A.5.29 – Information security during business disruption |
Requirement
-
All provider blocks MUST contain an explicit
region/location -
All region/location variables MUST have a
validationblock with allowed values -
A deny mechanism (SCP/Azure Policy/Org Policy) MUST be enabled at the organization level
-
The CI/CD process MUST block region violations — a warning alone is insufficient
-
Hardcoded non-sovereign regions (us-, ap-, sa-*) in IaC are prohibited
Implementation Guidance
-
Define allowed-regions list as a shared variable or locals in a base module.
-
Add variable validation to every region/location parameter.
-
Activate AWS SCP with
DenyOutsideApprovedRegionsat organization level. -
Configure Azure Policy or GCP Org Policy as the equivalent.
-
Implement CI gate: OPA or Sentinel validates the Terraform plan.
-
Activate drift detection: Scheduled scans find manually created resources.
-
Formalize exceptions: Every exception requires CISO/DPO approval, is time-limited, and documented.
Maturity Levels
| Level | Name | Criteria |
|---|---|---|
1 |
Region documented |
Permitted regions listed in policy document; no technical enforcement. |
2 |
IaC region constraints set |
All provider blocks have an explicit region; region variables with validation block. |
3 |
Full enforcement |
CI pipeline blocks non-sovereign deployments; OPA/SCP/Policy in effect; no undocumented exceptions. |
4 |
Continuous drift monitoring |
Scheduled scans detect resources outside approved regions; alerts within 1 hour; weekly compliance reports. |
5 |
Automatic remediation |
Non-compliant resources are automatically deleted or quarantined; full audit trail of every enforcement action. |
Terraform Checks
waf-sov-020.tf.aws.provider-region-in-allowed-list
Checks: AWS Provider must set region explicitly.
| Compliant | Non-Compliant |
|---|---|
|
|
waf-sov-020.tf.aws.region-variable-validation
Checks: Region variables must have a validation block with allowed values.
| Compliant | Non-Compliant |
|---|---|
|
|
waf-sov-020.tf.aws.no-hardcoded-non-sovereign-region
Checks: No hardcoded non-sovereign region strings (e.g. us-east-1, ap-southeast-1) in IaC.
| Compliant | Non-Compliant |
|---|---|
|
|
SCP Example (Organization Level)
Purpose: Last safety net – prevents API calls outside approved regions.
{
"Version": "2012-10-17",
"Statement": [{
"Sid": "DenyOutsideApprovedRegions",
"Effect": "Deny",
"NotAction": ["iam:*","sts:*","route53:*","cloudfront:*"],
"Resource": "*",
"Condition": {
"StringNotEquals": {
"aws:RequestedRegion": [
"eu-central-1",
"eu-west-1",
"eu-north-1"
]
}
}
}]
}
Evidence
| Type | Required | Description |
|---|---|---|
IaC |
✅ Required |
Terraform code with variable validation blocks for all region/location parameters. |
Policy |
✅ Required |
OPA/Sentinel rules, AWS SCP, Azure Policy, or GCP Org Policy with region restrictions. |
Logs |
Optional |
CI pipeline logs with blocked non-sovereign deployment attempt (as proof of function). |
Config |
Optional |
Cloud provider org-policy export with active region restrictions. |