Codenize any service, manage it with a DSL
Turn live infrastructure into declarative code. Export what already exists, review every change in version control, and apply it back - Idempotently, with a diff you can trust.
- Idempotent by design
- No state file
- Free & open source
hosted_zone "example.com." do
rrset "example.com.", "A" do
ttl 300
resource_records(
"127.0.0.1",
"127.0.0.2"
)
end
end
# $ roadwork -a --dry-run
# Apply `Routefile` to Route53 (dry-run)
Configuration you can diff, grep, and revert
Codenize.tools is an independent directory of these open-source tools. Read more about the codenize approach and the three ideas below.
Idempotency
The service converges to whatever the code says. Apply once or ten times - The result is the same, so retries and re-runs are always safe.
Easy to grep
Your entire service configuration lives in plain-text DSL files. Finding every reference to an IP, a hostname, or a policy is one grep away.
Managed by VCS
Every change is a commit: reviewed in a pull request, attributed to an author, and revertible in seconds when something goes wrong.
Export. Review. Apply.
Every codenize tool follows the same three-step loop - Brownfield-first, so you start from the infrastructure you already have.
Export what exists
Point the tool at your live service and export its current configuration to a DSL file.
$ roadwork -e -o RoutefileReview the diff
Commit the file, edit it, and dry-run to see exactly what would change - Before it does.
$ roadwork -a --dry-runApply idempotently
Apply the delta. Nothing else is touched, and re-running produces no further changes.
$ roadwork -aOne focused tool per service
From Route 53 records to MySQL grants - Each tool codenizes exactly one thing and does it well.
Roadworker
Roadworker manages Amazon Route 53 through a Ruby DSL. Export hosted zones to a Routefile, review diffs, dry-run changes, and apply them idempotently from the CLI.
ExploreRidgepole
Ridgepole manages your database schema declaratively. You define tables in a Rails-style Schemafile, and it diffs against MySQL or PostgreSQL and applies only the changes, idempotently.
ExploreMiam
Miam manages AWS IAM users, groups, roles, and policies through a Ruby DSL. Export current state to an IAMfile, review diffs, dry-run, and apply idempotently.
ExplorePiculet
Piculet manages EC2 Security Groups through a Ruby DSL. Export existing firewall rules to a Groupfile, review diffs in version control, dry-run, and apply idempotently.
ExploreBarkdog
Barkdog exports Datadog monitors into a Ruby DSL Barkfile, then applies edits idempotently with dry-run previews, turning alert definitions into reviewable, version-controlled code.
ExploreGratan
Gratan exports MySQL users and grants into a Ruby DSL Grantfile, then applies edits idempotently with dry-run previews, keeping database privileges reviewable in version control.
ExploreSee every change before it happens
Dry-run mode prints the exact difference between your DSL files and the live service. No surprises in production, no "what did that script just do?" moments.
- Diff output shows creates, updates, and deletes before they run
- Run dry-run in CI on every pull request
- Detect drift by scheduling a nightly dry-run
Start from the infrastructure you already have
You don't need to rebuild anything. Codenize tools export your existing configuration into clean, readable Ruby DSL files - Your first commit is your real production state.
- One-command export of live configuration
- No state file to bootstrap, back up, or corrupt
- The live API is always the source of truth
Guides to configuration as code
What Is Codenization? Managing Services as Code
Codenization turns live service configuration, like DNS, IAM, schemas, and monitors, into declarative Ruby DSL files you can grep, review, and re-apply. Learn where the approach came from, how the export-review-apply loop works, and when to choose it.
Read guideExport, Review, Apply: The Codenize Workflow
The practical getting-started guide: export live configuration with one command, commit it to Git, preview every change with a dry-run, and apply idempotently. Includes repo layout, review checklists, CI wiring, credentials, and rollback.
Read guideIdempotency in Infrastructure as Code, Explained
Idempotency means the same code applied N times yields the same result. See how codenize tools achieve it by diffing a declarative DSL against live APIs, with Route 53 and MySQL examples and the pitfalls to watch for.
Read guide