{"id":15858937,"url":"https://github.com/nitrocode/terraform-plan-applier","last_synced_at":"2026-03-06T02:38:07.590Z","repository":{"id":33783421,"uuid":"161122694","full_name":"nitrocode/terraform-plan-applier","owner":"nitrocode","description":"Applies terraform based on validated targets","archived":false,"fork":false,"pushed_at":"2022-02-11T13:41:15.000Z","size":228,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-27T17:51:28.359Z","etag":null,"topics":["apply","config","criteria","js","plan","terraform","yaml"],"latest_commit_sha":null,"homepage":"https://bit.ly/2l8yswT","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nitrocode.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}},"created_at":"2018-12-10T05:37:53.000Z","updated_at":"2021-05-10T23:22:52.000Z","dependencies_parsed_at":"2022-08-07T23:01:02.229Z","dependency_job_id":null,"html_url":"https://github.com/nitrocode/terraform-plan-applier","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/nitrocode/terraform-plan-applier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrocode%2Fterraform-plan-applier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrocode%2Fterraform-plan-applier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrocode%2Fterraform-plan-applier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrocode%2Fterraform-plan-applier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nitrocode","download_url":"https://codeload.github.com/nitrocode/terraform-plan-applier/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitrocode%2Fterraform-plan-applier/sbom","scorecard":{"id":689382,"data":{"date":"2025-08-11","repo":{"name":"github.com/nitrocode/terraform-plan-applier","commit":"389a73979f172c737f6fdc9d34cbe847d6787b0b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU Affero General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"12 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T01:55:32.626Z","repository_id":33783421,"created_at":"2025-08-22T01:55:32.627Z","updated_at":"2025-08-22T01:55:32.627Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30159658,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"online","status_checked_at":"2026-03-06T02:00:08.268Z","response_time":250,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["apply","config","criteria","js","plan","terraform","yaml"],"created_at":"2024-10-05T21:02:06.159Z","updated_at":"2026-03-06T02:38:07.570Z","avatar_url":"https://github.com/nitrocode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-plan-applier\n\nUses [terraform-plan-parser](https://github.com/lifeomic/terraform-plan-parser) to convert plan into json. Then reads from a yaml file to look for acceptable changes. If a specific target has all acceptable changes listed for it, then it will run `terraform apply` with only that specific target as well as other targets that meet the criteria.\n\n## Setup\n\n    npm i -g terraform-plan-applier\n\n## Usage\n\nSetup `apply.yml`\n\nThe following will allow an asg named blue for any service to have an additional subnet using the regex for new. Since it's adding the subnet, the old value will be empty. Running the script using this yaml file will return a list of targets or it can be configured to run `terraform apply -auto-approve`. If any of the attribute criteria fails, the target resource will be omitted.\n\n```yaml\nchangedResources:\n- path: 'module\\..*\\.module\\.service\\.module\\.blue\\.aws_autoscaling_group\\..*'\n  attributes:\n    # allow only if vpc_zone_identifier is added one of 2 subnets\n    - name: 'vpc_zone_identifier\\.[\\d]+'\n      old: ''\n      new: subnet-ac7b95a3|subnet-d74eeda1\n```\n\n```bash\n$ terraform-plan-applier -h\nUsage: terraform-plan-applier [options]\n\nOptions:\n  -V, --version        output the version number\n  -c, --config \u003cfile\u003e  required config criteria yaml to apply\n  -p, --plan [file]    optional output of `terraform plan` which can be piped in\n  --apply              Executes `terraform apply -auto-approve` if criteria is matched\n  -v, --verbose        verbose mode\n  -h, --help           output usage information\n\nDry Run Examples:\n  $ terraform plan | terraform-plan-apply -c apply.yml\n  $ cat terraform-plan.stdout | terraform-plan-apply -c apply.yml\n  $ AWS_PROFILE=dev terraform-plan-apply -c apply.yml \u003c terraform-plan.stdout\n\nApply Examples:\n  $ terraform-plan-apply --config apply.yml --apply \u003c terraform-plan.stdout\n  $ AWS_PROFILE=dev terraform-plan-apply --config apply.yml --apply \u003c terraform-plan.stdout\n```\n\n## Contribute\n\nIf you have time, please contribute! Standard fork, branch, PR model.\n\n## TODO\n\n* [ ] option to save plan output check to local file\n* [ ] option to save applied output to local file\n* [ ] allow action to be set e.g. update, replace, destroy\n  * also account for plan numbers like `Plan: 2 to add, 2 to change, 2 to destroy.` for more precise matching. If this fails, do not continue.\n* [ ] investigate support for module / type attribute searching\n  * how much more value does this bring?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitrocode%2Fterraform-plan-applier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnitrocode%2Fterraform-plan-applier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitrocode%2Fterraform-plan-applier/lists"}