Terraform/OpenTofu Compatibility Policy
This document defines how Kilolock handles IaC CLI version compatibility for OSS and managed deployments.
Customer Configuration
Customers choose their Terraform/OpenTofu version in their own runtime:
- Native Terraform/OpenTofu CLI usage:
- Version comes from the user’s local machine or CI image.
- Kilolock CLI scoped/targeted flows (
kl plan/apply):--terraform-binto select binary family/path.--iac-versionto select a versioned binary (terraform-1.9.8, etc).- Optional config defaults from
.kl.toml/ env (KL_IAC_BIN,KL_IAC_VERSION).
The Kilolock server does not execute customer Terraform plans in normal backend mode; it serves HTTP backend protocol and persists state metadata.
Quota Enforcement Model
Quota behavior differs depending on which client path the operator uses:
- Native Terraform/OpenTofu HTTP backend usage:
- Reads and writes go through the standard backend protocol.
- Hard quota is still enforced by the backend on the final state write.
- This means plain Terraform may discover quota failure late, after provider-side infrastructure work already happened.
- Kilolock CLI plan-driven usage:
kl planperforms a backend quota preflight from the plan's projected managed-resource delta.kl quota remainingshows current headroom.kl quota check --tf-plan ...lets CI or operators evaluate a Terraform plan explicitly before apply.- Hard quota overages fail early.
- Soft quota overages warn but still succeed.
Quota admission is based on the projected final state shape, not on a temporary in-flight peak during provider execution order. In practical terms:
- a plan that deletes
1000managed resources and creates100managedresources is evaluated as a net
-900change - if the resulting final state is within quota, the quota check passes
- Kilolock does not currently reject a plan solely because a
create-before-destroy or replacement sequence might temporarily have old and
new infrastructure alive at the same time before the final state settles
This applies both to:
- CLI-side preflight (
kl plan,kl quota check) - backend write-time hard enforcement on the final stored state
This is why plan admission is documented as a Kilolock CLI guarantee, not a generic Terraform HTTP backend guarantee.
Support Levels
- Supported:
- Versions covered by CI smoke matrix in
.github/workflows/ci.yml. - Current default matrix includes recent Terraform lines and OpenTofu.
- Versions covered by CI smoke matrix in
- Best effort:
- Nearby patch/minor releases not explicitly in matrix.
- Unsupported:
- Very old releases with known backend/protocol incompatibilities.
Operational Impact on Server
Different IaC client versions can affect:
- HTTP lock/retry behavior.
- State payload shape/size and
terraform_versionvalues recorded instate_versions. - Provider-driven plan/apply behavior on client side (not server execution path).
Observability
Control-plane API exposes observed version distribution:
GET /v1/api/platform/iac-versions?limit=50
This aggregates state_versions.terraform_version so operators can:
- See real version mix across tenants.
- Plan deprecation windows.
- Detect outlier clients after upgrades.
Recommended Practice
- Pin IaC versions per repo (CI image/toolchain).
- Upgrade in staged waves.
- Monitor observed versions in control API before removing support for older lines.