{"id":48218064,"url":"https://github.com/jalseth/tfplan-origins","last_synced_at":"2026-04-04T19:03:02.220Z","repository":{"id":344476452,"uuid":"1079391766","full_name":"jalseth/tfplan-origins","owner":"jalseth","description":"A utility to map resources in a Terraform plan back to their origin source files.","archived":false,"fork":false,"pushed_at":"2026-03-14T22:19:24.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-15T07:20:11.342Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jalseth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-19T18:00:40.000Z","updated_at":"2026-03-14T22:04:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jalseth/tfplan-origins","commit_stats":null,"previous_names":["jalseth/tfplan-origins"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jalseth/tfplan-origins","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalseth%2Ftfplan-origins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalseth%2Ftfplan-origins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalseth%2Ftfplan-origins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalseth%2Ftfplan-origins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jalseth","download_url":"https://codeload.github.com/jalseth/tfplan-origins/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalseth%2Ftfplan-origins/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31409471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-04T19:02:36.823Z","updated_at":"2026-04-04T19:03:02.202Z","avatar_url":"https://github.com/jalseth.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tfplan-origins\n\nA utility to map resources in a Terraform plan back to their origin source files.\n\n## Output format\n\nThe enriched plan is the standard Terraform plan JSON with a `_loc` field added to each resource change, pointing to the source file and line where the resource is defined:\n\n```json\n{\n  \"resource_changes\": [\n    {\n      \"address\": \"aws_s3_bucket.example\",\n      \"_loc\": {\n        \"file\": \"infra/main.tf\",\n        \"line\": 12\n      },\n      ...\n    }\n  ]\n}\n```\n\n## GitHub Action\n\nThe easiest way to use `tfplan-origins` is via the GitHub Action. It builds the tools from source and enriches your Terraform plan JSON with source file locations.\n\n```yaml\n- name: 'create plan'\n  working-directory: 'infra'\n  run: |\n    terraform init\n    terraform plan -out=plan.bin\n    terraform show -json plan.bin \u003e plan.json\n\n- name: 'enrich plan with origins'\n  id: 'origins'\n  uses: 'jalseth/tfplan-origins@main'\n  with:\n    terraform-dir: 'infra'\n    plan-json: 'infra/plan.json'\n\n- name: 'use enriched plan'\n  run: cat '${{ steps.origins.outputs.enriched-plan-file }}'\n```\n\n### Inputs\n\n| Input | Required | Default | Description |\n|-------|----------|---------|-------------|\n| `plan-json` | yes | | Path to the Terraform plan JSON (output of `terraform show -json`) |\n| `terraform-dir` | no | `.` | Root Terraform config directory |\n| `output-file` | no | `enriched_plan.json` | Path where the enriched plan JSON will be written |\n| `go-version` | no | `1.25` | Go version used to build the tools |\n| `cache` | no | `true` | Cache the built binaries between runs |\n\n### Outputs\n\n| Output | Description |\n|--------|-------------|\n| `enriched-plan-file` | Absolute path to the enriched plan JSON |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjalseth%2Ftfplan-origins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjalseth%2Ftfplan-origins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjalseth%2Ftfplan-origins/lists"}