{"id":15867219,"url":"https://github.com/apparentlymart/terraform-plan-output-grammar","last_synced_at":"2026-01-08T08:43:35.547Z","repository":{"id":66568593,"uuid":"433659191","full_name":"apparentlymart/terraform-plan-output-grammar","owner":"apparentlymart","description":"A TextMate-style grammar for the human-oriented Terraform plan diff output","archived":false,"fork":false,"pushed_at":"2021-12-01T02:42:04.000Z","size":8,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T19:49:47.587Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apparentlymart.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}},"created_at":"2021-12-01T02:41:48.000Z","updated_at":"2022-01-19T20:01:01.000Z","dependencies_parsed_at":"2023-10-20T17:30:34.989Z","dependency_job_id":null,"html_url":"https://github.com/apparentlymart/terraform-plan-output-grammar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apparentlymart%2Fterraform-plan-output-grammar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apparentlymart%2Fterraform-plan-output-grammar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apparentlymart%2Fterraform-plan-output-grammar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apparentlymart%2Fterraform-plan-output-grammar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apparentlymart","download_url":"https://codeload.github.com/apparentlymart/terraform-plan-output-grammar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246712324,"owners_count":20821707,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-10-05T23:41:45.948Z","updated_at":"2026-01-08T08:43:35.522Z","avatar_url":"https://github.com/apparentlymart.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# TextMate-style Grammar for Terraform Plan Diff Output\n\nThis repository contains a TextMate-style language grammar for tokenizing the\nhuman-oriented output from the `terraform show PLANFILE` command in\nHashiCorp Terraform.\n\nThis is not a typical programming language but instead more of a domain-specific\ndiff representation intended for human consumption. The goal here is therefore\njust to help call out some interesting tokens that might be interesting to\nhighlight when including a Terraform plan diff in a place which uses inferred\nhighlighting information, such as Markdown literal blocks in systems which use\nTextMate-style grammars to format their contents.\n\nThe goal is to provide at least enough tokens to roughly recreate the\nformatting Terraform would typically produce itself in a virtual terminal using\nescape sequences, though it also includes some additional detail in case it's\nuseful to achieve a more detailed highlighting result than Terraform would\ntypically be able to achieve within the constraints of a terminal.\n\nBecause this is not a typical use-case for TextMate-style grammars, the scopes\nselected are rather idiosyncratic and intended to stand a reasonable chance of\nmatching rules in existing themes designed for more \"normal\" languages, because\nit's unlikely that most rendering environments would have rules specifically\nfor this very-specialized grammar.\n\n## Testing\n\nThis grammar has test cases under the `tests` directory which are intended for\nuse with\n[`vscode-tmgrammar-test`](https://github.com/PanAeon/vscode-tmgrammar-test).\n\nTo run those tests, install that tool and then run a command like the\nfollowing:\n\n```shell\nvscode-tmgrammar-test -s 'text.tfplandiff' -g 'terraformPlanDiff.tmLanguage.json' -t './tests/*'\n```\n\nThe test only catches incorrect and missing tokens, and will not catch _new_\ntokens that were not previously mentioned in the test. When adding new\ntokens to the grammar it's important to visit the existing test cases and\nintroduce new assertions for locations where those new tokens ought to apply.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapparentlymart%2Fterraform-plan-output-grammar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapparentlymart%2Fterraform-plan-output-grammar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapparentlymart%2Fterraform-plan-output-grammar/lists"}