Dataset
Infrastructure as code datasets for AI training
An infrastructure as code dataset is a set of private repositories that define an organization's cloud and cluster infrastructure in Terraform, Pulumi, CloudFormation, Helm, Kubernetes manifests or Ansible, delivered with commit history and the plan, apply and policy-check output recorded for each change. SourceX sources these to a buyer's spec from established businesses whose platform teams keep them in git and in run tools such as Atlantis, Spacelift or Argo CD. Each dataset is de-identified and licensed for an agreed permitted use.
Dataset manifest
Sourced to your spec- What it is
- Infrastructure definitions in git, joined to the plan, apply and policy-check output of each change
- Typical systems
- Terraform, Pulumi, CloudFormation, Helm, Kubernetes manifests and Ansible; runs in HCP Terraform (formerly Terraform Cloud), Atlantis, Spacelift or Argo CD
- Typical history
- Git history often spans years; run output goes back only as far as the run tool or CI system kept it
- Modality
- Declarative code and templates, with plans, policy results and run logs as structured records
- Delivery formats
- Agreed per order; git bundles, JSON plans, JSONL run records and rendered manifests
- Preparation
- State files excluded; secrets removed; account IDs, ARNs, hostnames and address ranges tokenized; verify on the sample
- Licensing
- Scoped per repository and environment after rights review; permitted use agreed per license
- Availability
- Sourced to your spec from teams that kept run output; supply is not guaranteed
What a delivery contains
Fields vary by source system and are fixed per order. A typical delivery includes:
| Field | Type | What it holds |
|---|---|---|
| change_id | string | Pseudonymous ID for one infrastructure change, joining its commits or pull request to every plan, policy check and apply run. |
| tool | object | The IaC tool, the provider versions pinned in its lock file, the state backend type and how runs were triggered. |
| stack_ref | object | The root module, workspace, stack, chart release or inventory group the change applied to, with its environment label. |
| code_diff | object | The patch to HCL, YAML, templates or variable files, with the base commit and the commit message. |
| module_calls | array | Modules, charts or roles the changed configuration calls, with source and pinned ref. |
| rendered_config | string | For templated tools, the output of helm template, kustomize build or synthesis, which is what reaches the cluster. |
| plan | object | The machine-readable plan: each resource address with a change object holding its action list, before and after values, and markers for unknown and sensitive values. |
| policy_checks | array | Results from tools such as Sentinel, OPA or Checkov: rule, enforcement level, pass or fail, and any override with the role that granted it. |
| plan_review | object | Approvals and comments made on the plan, re-plans requested, and whether the posted plan text was truncated. |
| apply | object | The apply result: status, the resource that failed, the provider error text and what was left in place. |
| drift | object | Whether the plan showed changes made outside the code, how they were detected, and whether the fix changed the environment or the code. |
| follow_up | array | Later changes linked to this one, labeled as fix-forward, revert, import, state move or policy exception. |
| tokenization | object | Which identifier classes were replaced, such as account IDs, ARNs and address ranges, and whether tokens match across artifacts. |
Field names from the table above; values are masked placeholders.
Example record
{
"change_id": "chg_5e21a8",
"tool": { "name": "terraform", "lock_file": ".terraform.lock.hcl", "backend": "remote_object_store", "trigger": "pull_request" },
"stack_ref": { "root_module": "live/prod/network", "workspace": "prod-east", "environment": "production" },
"code_diff": { "base_commit": "a91c3fe", "patch_ref": "patches/chg_5e21a8.patch",
"message": "Reword security group descriptions to match the naming standard" },
"module_calls": [ { "address": "module.app_sg", "source": "modules/security-group", "ref": "v3" } ],
"plan": {
"format": "json",
"resource_changes": [
{ "address": "module.app_sg.aws_security_group.this", "type": "aws_security_group",
"change": {
"actions": ["delete", "create"],
"before": { "description": "app tier", "vpc_id": "[VPC_02]" },
"after": { "description": "prod-app-tier ingress", "vpc_id": "[VPC_02]" },
"after_unknown": { "id": true, "arn": true },
"replace_paths": [["description"]] } }
],
"action_counts": { "add": 1, "change": 0, "destroy": 1 }
},
"policy_checks": [
{ "engine": "opa", "rule": "deny_open_ingress", "result": "pass" },
{ "engine": "sentinel", "rule": "require_cost_center_tag", "level": "soft-mandatory",
"result": "fail", "overridden_by_role": "platform_lead" }
],
"plan_review": { "approvals": 1, "comment_truncated": false },
"apply": { "status": "errored", "failed_address": "module.app_sg.aws_security_group.this",
"error": "DependencyViolation: resource [SG_114] has a dependent object",
"outcome": "Old group still attached to running instances; nothing replaced" },
"follow_up": [
{ "change_id": "chg_5e2204", "kind": "fix_forward",
"message": "Use name_prefix and create_before_destroy so the new group exists before the old one is removed" }
],
"tokenization": { "classes": ["account_id", "arn", "cidr", "resource_id", "hostname"], "consistent_across_artifacts": true }
}Synthetic record for illustration. Field names, structure and format are agreed per order.
What AI teams use it for
Predict what a change will do
Given a diff and the configuration around it, a model learns which resources are created, updated in place or replaced, scored against the recorded plan.
Review infrastructure pull requests
Reviewer comments, policy failures and overrides on real plans teach a model to flag destructive or non-compliant changes before apply.
Repair failed applies
An apply error paired with the fix-forward commit is a worked example of diagnosing a provider failure the plan did not predict.
Reconcile drift
Drift commits show when engineers reverted the environment and when they codified the manual change, a call an operations agent has to make.
Evaluate infrastructure agents offline
Held-out changes with recorded plans and apply results let you test an agent's prediction without giving it a live cloud account.
Use-case guides: Coding agents, Enterprise and computer-use agents, Private evaluation sets
What makes this data valuable
Machine-readable plans
JSON plans with per-resource actions can be scored by code. Text-only plans need parsing and may be cut off or split across comments.
Apply outcome on record
Each plan is linked to the apply that followed, including failures and partial applies.
Policy results with overrides
Failed checks, who overrode them and inline skip comments show where the stated policy bends.
Pinned versions
Lock files and module refs fix the provider and module versions each change was planned with.
Promotion across environments
The same module change applied to development, staging and production shows how results differ by environment.
Consistent tokenization
One token per account, network and host across code, plans and logs keeps references resolvable.
Record timeline
Infrastructure as code
The plan is the ground truth for a change
Infrastructure code states what should exist. It does not state what a change will do, because that depends on two things the repository does not hold: the recorded state of the environment and the provider's rules for each attribute. A one-line edit to a description is an in-place update on one resource type and a destroy-and-recreate on another. Terraform's text plan marks each resource for create, update in place, destroy or replace and names the attribute that forces replacement. The machine-readable plan lists every resource change with its actions, its before and after values, and the values known only after apply.
Other tools keep the same record under other names. A CloudFormation change set says whether a modification requires replacement, Pulumi has its preview, Ansible has check mode with per-task diffs, and a GitOps controller such as Argo CD reports the diff against live objects and then the sync and health status. With that record attached, a model's prediction of what a diff does can be scored against what the tool computed. Code alone can only be linted.
Apply output adds the second half. A correct plan can still fail at apply on a quota, a name collision, a missing permission or a dependency the provider did not model, and the next commit shows the repair. A plan is valid only against the state it was computed from, so it cannot be regenerated later. Plans posted as pull request comments can be cut off, or split across several comments, when they exceed the code host's comment size limit. Terraform's JSON output also shows sensitive values in plain text that the text rendering masks.
Private repositories record one real environment and its drift
Public infrastructure code is largely modules and examples written for reuse, where every value is a variable and the example builds one network and one instance. Private repositories hold the root configurations that call those modules with real values. They show how one organization splits accounts by environment and team, allocates address ranges, names and tags resources, and divides state into stacks so one apply cannot touch everything. They also hold the exceptions: an ignore_changes entry on a field an autoscaler owns, a prevent_destroy on a database, an inline checkov:skip comment that cites a ticket.
Drift has no public equivalent. Real environments change outside the code, through a console fix during an incident, a controller that mutates objects or a provider upgrade that changes a default. It surfaces as a plan proposing changes nobody wrote, or in a scheduled refresh-only run. The commit that resolves it records a decision: reapply the code and undo the manual change, or accept reality by editing the code, adding an import or moved block, or moving addresses in state. Each is a labeled case of an engineer choosing which side was right.
Preparation is harder than for application code, because the identifiers are the content. Account IDs sit inside ARNs, trust policies and bucket names. If address ranges are swapped for unrelated tokens, a subnet no longer falls inside its network. Ask whether tokenization preserves containment and references across code, plans and logs. Confirm that state files are excluded outright, since they store resource attributes, secrets included, in plain text.
What to check before licensing
- Confirm that state files, state backups and stack checkpoints are excluded, and ask how sensitive values inside JSON plans were treated, since those plans can show them in plain text.
- Ask for a secret scan across the full git history, variable files, Helm values, Ansible vault files and run logs, and confirm that any live credentials found were rotated.
- Check on the sample that account IDs, ARNs, address ranges, hostnames, domains and bucket names are tokenized consistently, and that subnets still fall inside their networks.
- Count how many changes on the sample have a JSON plan, a text-only plan or no plan, and check that truncated plans are flagged.
- Ask how each plan and apply was joined to its commit. A commit SHA recorded by the run tool is stronger than a timestamp match, and a pull request with several re-plans should mark the one applied.
- Confirm the partner owns the code, and that modules written by consultants or managed service providers, and forks of public modules, are identified with their licenses.
- Ask whether firewall rules, IAM policies and network layout for live environments are in scope, and how retired environments are flagged.
Delivery No files move before a signed license. A listing or a request grants no files by itself.
How licensing works through SourceX
- 1
Define
Send the domain, modality, volume, format, timeline and permitted use you need.
- 2
Source
SourceX identifies businesses that hold matching data and are open to licensing it.
- 3
Qualify
Fit, rights and quality are checked, and you review samples before committing.
- 4
License
Scope, permitted use, exclusivity, price and obligations are agreed in writing.
- 5
Deliver
Approved data is prepared, de-identified where required and transferred securely.
Questions Acquisition Partners ask
Why is plan output needed if I have the code and its history?
Because the code does not say what a change does. Whether an edit updates a resource in place or destroys and recreates it depends on the environment's state and the provider's rules, and only the plan records the answer. With plan and apply output attached, each change has a verifiable result. Without it you have configuration text that can be linted but not checked.
Can the recorded plans be regenerated from the repository?
No, not faithfully. A plan is computed against the state and the live environment at one moment, and neither is part of the delivery. State files should be excluded because they hold secrets, and the cloud accounts have moved on. The plan recorded at the time is the only copy, so retention in the run tool sets how many changes can be paired.
Which infrastructure-as-code tools can a dataset cover?
Any that the partner's platform team used, most often Terraform or OpenTofu, Pulumi, CloudFormation, Helm, Kustomize, plain Kubernetes manifests and Ansible. Many organizations run several at once, with Terraform for cloud resources and Helm or GitOps for what runs on the clusters. State in your spec which tools, clouds and resource types matter to you.
How do Kubernetes and Helm changes differ from Terraform changes?
They have no plan step in the Terraform sense. The closest record is the diff between rendered manifests and live objects, then the sync result: which objects were created, configured or pruned, and whether the workload became healthy. Helm charts and values files are templates, so the reviewed diff is not what reached the cluster. Ask for rendered manifests and sync history alongside the charts.
How are secrets, account IDs and network addresses handled?
Your spec should require that secrets are removed and infrastructure identifiers tokenized before delivery, and you should verify both on the sample. Secrets turn up in variable files, Helm values, vault files, run logs and old commits. Account IDs, ARNs, hostnames and address ranges are replaced with tokens that should stay consistent so references still resolve. No de-identification method is perfect, so ask what was scanned.
How far back does plan and apply history go?
Usually less far than the git history. Commits last as long as the repository, while plan and apply output lasts only as long as the run tool, the CI system or the pull request comments kept it. Specify the minimum number of paired changes you need, and whether unpaired earlier history is still useful to you.
Related datasets
- Proprietary codebases with full history
Complete private repositories with full version history, build files, tests and docs
- Feature flag, configuration and release histories
Audit-logged flag and configuration changes with rollout metrics, ship or roll-back decisions and internal release notes
- IT service management and incident histories
Incidents, problems, changes and requests with work notes, CI links and outcomes
- CI/CD pipeline logs and build failures
Pipeline runs with step logs and exit codes, joined to triggering and fixing commits
- Cloud cost and usage records
Line-item billing and usage exports with tags, commitments, anomalies and the optimization actions taken
Evaluating this data for procurement?
Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.
Request dataset diligenceTell us what your models need
Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.
Updated 25 November 2026.