{"id":20334899,"url":"https://github.com/mdb/terraguard","last_synced_at":"2026-05-09T13:39:58.137Z","repository":{"id":41955158,"uuid":"347664114","full_name":"mdb/terraguard","owner":"mdb","description":"Check a Terraform plan for problematic resource changes.","archived":false,"fork":false,"pushed_at":"2022-04-22T11:27:15.000Z","size":2275,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-14T16:36:14.511Z","etag":null,"topics":["terraform"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-14T14:47:18.000Z","updated_at":"2022-04-22T15:52:10.000Z","dependencies_parsed_at":"2022-08-12T00:31:16.418Z","dependency_job_id":null,"html_url":"https://github.com/mdb/terraguard","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fterraguard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fterraguard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fterraguard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fterraguard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdb","download_url":"https://codeload.github.com/mdb/terraguard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241854606,"owners_count":20031467,"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":["terraform"],"created_at":"2024-11-14T20:38:32.111Z","updated_at":"2026-05-09T13:39:53.035Z","avatar_url":"https://github.com/mdb.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/mdb/terraguard/actions/workflows/ci.yml/badge.svg)](https://github.com/mdb/terraguard/actions/workflows/ci.yml)\n\n# terraguard\n\n`terraguard` helps automate [Terraform plan](https://www.terraform.io/docs/cli/commands/plan.html) reviews by checking a Terraform plan JSON for problematic resource changes.\n\n`terraguard` is a minimal alternative to Terraform policy enforcement tools like [Open Policy Agent](https://www.openpolicyagent.org/) and [Sentinel](https://www.hashicorp.com/sentinel).\n\n## CLI Usage\n\n`terraguard check` examines a Terraform plan JSON file for changes to guarded resources.\n\n```text\nterraguard check --help\nCheck if a Terraform plan seeks to modify the specified resources\n\nUsage:\n  terraguard check [flags]\n\nFlags:\n  -g, --guard strings   A comma-separated list of guarded resource addresses\n  -h, --help            help for check\n  -p, --plan string     The path to a Terraform plan output JSON file\n```\n\nBasic example:\n\n```text\nterraguard \\\n  check \\\n    --guard=\"*foo*\" \\\n    --plan=\"test_fixtures/basic_plan.json\"\nError: test_fixtures/basic_plan.json indicates changes to guarded resources:\n\nmodule.foo.null_resource.aliased\nmodule.foo.null_resource.foo\nnull_resource.foo\n```\n\nWith multiple guarded resources:\n\n```text\nterraguard \\\n  check \\\n    --guard=\"*foo*\" \\\n    --guard=\"*bar*\" \\\n    --guard=\"null_resource.baz[0]\" \\\n    --plan=\"test_fixtures/basic_plan.json\"\nError: test_fixtures/basic_plan.json indicates changes to guarded resources:\n\nmodule.foo.null_resource.aliased\nmodule.foo.null_resource.foo\nnull_resource.bar\nnull_resource.baz[0]\nnull_resource.foo\n```\n\n## Disclaimer\n\nTools like [Open Policy Agent](https://www.openpolicyagent.org/) and [its Terraform capabilities](https://www.openpolicyagent.org/docs/latest/terraform/) arguably offer more robust, extendable, and fully featured means of enforcing Terraform policies. `terraguard` is comparatively simple, though is far less mature.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdb%2Fterraguard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdb%2Fterraguard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdb%2Fterraguard/lists"}