NEW
Representing governance policies as version-controlled code that can be tested and deployed.
DESCRIPTION
Governance as code codifies policies for access, quality, privacy, and compliance, enabling automated enforcement and auditing. Policies live alongside code, reviewed, tested, and deployed via CI/CD. Engines like OPA integrate with services to provide consistent controls across the stack. This approach reduces manual errors, increases transparency, and scales governance. It supports drift detection and rollback, improving reliability. Authoring policies in declarative languages simplifies reasoning and change management. Adoption requires clear policy models, tooling, developer education, and integration across data and cloud platforms. It aligns governance with modern engineering practices.
ALTERNATIVE DEFINITIONS
HashiCorp
Policy as code is the practice of writing policies in a high-level language and automating their evaluation and enforcement.
Stresses code-based authoring and automated enforcement.
Open Policy Agent
OPA is a general-purpose policy engine that enables policy-as-code across the stack.
Introduces a policy engine commonly used to implement governance as code.
Microsoft Azure
Azure Policy helps enforce organizational standards and assess compliance at scale with policy definitions and assignments.
Vendor implementation of codified governance policies at cloud scale.
RELATED TERMS
Open Policy Agent Infrastructure as Code Governance Access Control Compliance Automation Version Control Continuous Integration Auditability Code Review
COMPETING TERMS
Manual Governance Processes
KNOWLEDGE AREAS
Data Governance Data Management Data Security Software Engineering MLOps AI
TARGET AUDIENCE
Data Governance Manager DevOps Engineer Data Engineer Cloud Architect Chief Data Officer MLOps Engineer
EXTERNAL SOURCES
- Wikipedia - Open Policy Agent
- Open Policy Agent - OPA documentation for policy-as-code
- HashiCorp - Concept overview of policy as code
- Microsoft - Azure Policy documentation
TOP QUESTIONS
What is Governance as Code in data platforms?
It codifies access, privacy, quality, and compliance policies and enforces them automatically across services and pipelines.
Category: Overview
Why use Governance as Code?
It reduces manual errors, scales enforcement, and enables audits, testing, versioning, and rollback of policy changes.
Category: Relevancy
Which tools implement Governance as Code?
Open Policy Agent, Azure Policy, HashiCorp Sentinel, and AWS Config rules are common solutions.
Category: Example
How are policies tested in Governance as Code?
Policies include unit tests and are validated in CI pipelines, with staged deployments and monitoring for drift.
Category: HowTo
What is a common mistake with Governance as Code?
Writing opaque, overly complex policies without documentation or tests undermines trust and maintainability.
Category: Mistakes
What risks exist in Governance as Code?
Misconfigured policies can cause outages or access denial. Poor separation of duties can weaken oversight.
Category: Risk
How does Governance as Code relate to Infrastructure as Code?
Policies augment IaC by controlling resource configurations, access, and compliance, often evaluated during provisioning.
Category: Relation
Where should policies live in Governance as Code?
Policies should be stored in version control, reviewed like code, and deployed via CI/CD pipelines.
Category: BestPractice
What competes with Governance as Code?
Manual approvals, policy documents, and spreadsheet controls that lack automation and auditability.
Category: Alternatives