Delivery · PR Cost Gates
Know what a pull request costs before it merges.
Zaysa prices every Terraform and Kubernetes change on the pull request, compares it with your budget and posts the result to GitHub as a check, so an over-budget change can wait for approval.
Pull request · shop/infra
#482 Scale checkout for the spring sale
@dana wants to merge into main · 7 files changed
aws_instance.checkout
Modified · Before m6i.large × 3 · $210.24/mo
m6i.2xlarge × 4 · $1,121.28/mo
+$0.00 Live AWS Pricing APIaws_elasticache_cluster.sessions
Added · Before -
cache.r6g.large · $150.38/mo
+$0.00 Live AWS Pricing APIChecks
Zaysa / Cost Gate · checking
Zaysa / Cost Gate
Est. +$1,061/mo - exceeds $1000/mo budget (blocked)
Zaysa / Cost Gate
Approved by Maya (FinOps) - est. +$1,061/mo
Merging waits for an approval in Zaysa.
Comment: Zaysa Cost Gate - Approved
Zaysa approval
PR #482 · shop/infra
+$1,061.42/mo · budget $1,000
- 01A pull request is opened
- 02Zaysa reads the infrastructure files
- 03Each change is priced
- 04Checked against your budget
- 05The merge waits
- 06Approved in Zaysa
- 07GitHub is updated
Example data.
How it works
From pull request to decision
Connect a repository and set a budget
Set a monthly budget in USD for each repository and choose Warn or Block.
Example data.
Every push is checked again
Zaysa reads changed Terraform and Kubernetes files and updates the GitHub comment and check.
Example data.
Approve or reject in Zaysa
Someone with permission to manage PR Cost Gates reviews an over-budget pull request in Zaysa.
+$1,061.42/mo · budget $1,000
Example data.
Budget action
Warn or block, your choice
Set a monthly budget for each repository. Warn leaves the pull request able to merge. Block posts a failing check for an over-budget change. An authorised person can approve or reject it in Zaysa. Approval turns the check green; rejection leaves it failing with the reason.
GitHub checks
Est. +$1,061/mo - exceeds $1000/mo budget (blocked)
Merging waits for an approval in Zaysa.
GitHub holds the merge when Zaysa / Cost Gate is a required status check in your branch protection or ruleset.
Within budget, the check succeeds: Est. +$150/mo - within $1000/mo budget ✓
Example data.
Infrastructure diff
What it reads
Zaysa reads size attributes and counts from changed Terraform files. It also gives Kubernetes manifests a rough estimate per workload type, labelled as an estimate.
- Size attributes: instance_type, instance_class, node_type, machine_type, tier, size, vm_size and sku_name. The database engine is priced too.
- Counts: count, desired_capacity, desired_count, node_count, num_cache_nodes, replicas and min_size.
- Counts written as a variable, such as count = var.replicas, cannot be read from a diff and are not guessed.
Example data.
Cost analysis
Prices you can check
The Zaysa Cost Analysis comment names the source of every line. It shows the increase or saving, a budget bar, each resource's before and after cost, and how many infrastructure files were scanned.
- Live from the provider.
- Published rates when the live lookup is unavailable.
- Estimated average, labelled.
Prices are on-demand. Reserved, spot and committed-use rates would be lower.
Zaysa Cost Analysis
Blocked · +$1,061.42/month · 106% of $1,000/mo budget
| Resource | Before → After | Monthly Δ | Source |
|---|---|---|---|
| aws_instance. | m6i.large × 3$210.24/mo m6i.2xlarge × 4$1,121.28/mo | +$0.00/mo | ● Live AWS |
| aws_elasticache_cluster. | -No previous cost cache.r6g.large$150.38/mo | +$0.00/mo | ● Live AWS |
aws_instance.
Modified
● Live AWS
aws_elasticache_cluster.
Added
● Live AWS
2 infrastructure files scanned of 7 changed files. Example data.
Migration check
Database migrations, checked on the same pull request
PostgreSQL and MySQL migrations receive a separate Zaysa / Migration Check and a Zaysa Migration Check comment. Zaysa flags locks, table rewrites, data loss and renames that break running queries.
If the database is connected, the comment can add real table size, row count and writes per second, and warn when a long-open transaction would make the lock queue.
CREATE INDEX idx_orders_customer ON orders (customer_id);
High · Zaysa / Migration Check
Creating index non-concurrently blocks table writes
CREATE INDEX CONCURRENTLY idx_orders_customer ON orders (customer_id);
orders · 18 GB · 48M rows · ~320 writes/s
When the database is connected
Example data.
Notifications
Alerts where your team already is
Set alert channels once for the organisation. Over-budget alerts use those channels. If the pull request links a Jira issue, Zaysa comments on it.
An over-budget alert goes to the organisation alert channel.
Slack
An over-budget alert goes to the organisation alert channel.
Microsoft Teams
An over-budget alert goes to the organisation alert channel.
Webhook
An over-budget alert goes to the organisation alert channel.
Jira comment
Zaysa comments when the pull request links a Jira issue.
ON THE PRO PLAN
Know the cost before you merge
PR Cost Gates
Warn or block a pull request when its estimated cost exceeds the repository budget.
Migration check on the same pull request
See database migration risks beside the cost check.
Deploy with AI
Review the configuration before choosing when to deploy.
Pipelines for GitHub Actions and Jenkins
Run the prepared pipeline in your CI system.
Questions
Frequently asked questions
GitHub holds the merge only when Zaysa / Cost Gate is a required status check in the repository branch protection or ruleset. With Warn, the pull request can still merge.
More in Delivery
See what you run, and what it costs.
Free plan, no card needed.