# Install terraform-iam-policy-validator with Homebrew, Nix

CLI to validate AWS IAM policies in Terraform templates for best practices. Version 0.0.9 via Homebrew; verified 2026-05-15.

## Install

```sh
sudo av install brew:terraform-iam-policy-validator
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install terraform-iam-policy-validator
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#terraform-iam-policy-validator
```

  Evidence: nixpkgs package indexes: pkgs/by-name/te/terraform-iam-policy-validator/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:terraform-iam-policy-validator
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/terraform-iam-policy-validator>
- **Version:** 0.0.9
- **Source summary:** CLI to validate AWS IAM policies in Terraform templates for best practices
- **Homepage:** <https://github.com/awslabs/terraform-iam-policy-validator>
- **Repository:** <https://github.com/awslabs/terraform-iam-policy-validator>
- **Upstream docs:** <https://github.com/awslabs/terraform-iam-policy-validator#readme>
- **License:** MIT-0
- **Source archive:** <https://files.pythonhosted.org/packages/89/6b/bdb90f2fcb4a0033f138d52d5b24af9a2f8a84703ef94cbc31d51f0afaed/tf_policy_validator-0.0.9.tar.gz>
- **Last updated:** 2026-05-15T11:14:03Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- tf-policy-validator (cli)
- tf-policy-validator (alias)

## Dependencies

- libyaml
- python@3.14

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.0.9
- Package-manager updated: 2026-05-15
- Local data: ok
- Upstream repository: https://github.com/awslabs/terraform-iam-policy-validator
- info: No cached GitHub release or tag data was available.
## Project history and usage

terraform-iam-policy-validator is an AWS Labs security CLI, installed as `tf-policy-validator`, that checks IAM policies extracted from Terraform plan output with IAM Access Analyzer validation and custom policy checks.

### Project history

The awslabs/terraform-iam-policy-validator repository was created on GitHub in August 2022. Its README describes a command-line tool that parses Terraform templates for IAM identity-based and resource-based policies, then runs them through IAM Access Analyzer policy validation checks and optional custom policy checks.

### Adoption history

The project is narrower than general Terraform linters because it focuses specifically on AWS IAM policy semantics. The input package facts list Homebrew and Nix packaging, while the official README documents Python installation with `pip install tf-policy-validator`, indicating use both as a Python CLI and as a packaged security tool.

### How it is used

The documented workflow is to run Terraform, convert a plan to JSON with `terraform show -json`, and pass that file to `tf-policy-validator validate` with an AWS region and config file. The tool can fail a pipeline when findings of selected severity levels are treated as blocking.

The README also documents custom checks for no-new-access, access-not-granted, and no-public-access. Because those checks call AWS IAM Access Analyzer APIs through boto3, the tool uses normal AWS credential resolution, including environment variables, shared credentials, AWS config, assume-role providers, and EC2 instance metadata.

### Why package nerds care

For package-manager users, terraform-iam-policy-validator represents the compliance side of Terraform packaging: it is a standalone executable meant to be dropped into CI after `terraform plan`, with policy behavior controlled by command flags and config files. Its importance is strongest in AWS-heavy shops that want IAM policy review before apply.

### Timeline

- 2022: GitHub repository created.
- 2024: v0.0.6 and v0.0.7 releases published.
- 2024: v0.0.8 release added custom-check changes including check-no-public-access.
- 2025: v0.0.9 listed as the latest GitHub release during research.

### Related projects

- The README ties the tool to AWS IAM Access Analyzer, boto3 credential handling, Terraform plan JSON, and AWS sample material for IAM Access Analyzer custom policy checks.

### Sources

- <https://api.github.com/repos/awslabs/terraform-iam-policy-validator>
- <https://github.com/awslabs/terraform-iam-policy-validator#readme>
- <https://github.com/awslabs/terraform-iam-policy-validator/releases>
- source_facts.package-manager


## Security Notes

No matching local secret-handling manifest was found for terraform-iam-policy-validator. Nucleus package metadata is still published here so future coverage has a stable package URL.



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Credential files

- Unix: ~/.aws/credentials, ~/.aws/config
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** terraform-iam-policy-validator
- **Version Scheme:** 0
- **Revision:** 4
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Nix - terraform-iam-policy-validator: normalized package name match | nixpkgs package indexes: pkgs/by-name/te/terraform-iam-policy-validator/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Related links

- [Cloud CLI packages](https://www.automicvault.com/pkg/cloud-clis/) - Belongs to a cloud or infrastructure command family.
- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [python@3.14](https://www.automicvault.com/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [parliament](https://www.automicvault.com/pkg/brew/parliament/) - Shares av.db curated category or tags: aws, cli, cloud-security, iam, security.
- [trailscraper](https://www.automicvault.com/pkg/brew/trailscraper/) - Shares av.db curated category or tags: aws, cli, cloud-security, iam, security.
- [cfripper](https://www.automicvault.com/pkg/brew/cfripper/) - Shares av.db curated category or tags: aws, cli, cloud-security, security.
- [cliam](https://www.automicvault.com/pkg/brew/cliam/) - Shares av.db curated category or tags: aws, cli, cloud-security, iam, security.
- [cloudsplaining](https://www.automicvault.com/pkg/brew/cloudsplaining/) - Shares av.db curated category or tags: aws, cli, cloud-security, iam, security.
- [principalmapper](https://www.automicvault.com/pkg/brew/principalmapper/) - Shares av.db curated category or tags: aws, cli, cloud-security, iam, security.
- [checkov](https://www.automicvault.com/pkg/brew/checkov/) - Shares av.db curated category or tags: cli, compliance, security, terraform.
- [cloudfox](https://www.automicvault.com/pkg/brew/cloudfox/) - Shares av.db curated category or tags: aws, cli, cloud-security, security.

## Combined YAML source

View the package source record on GitHub. [combined/terraform-iam-policy-validator.yml](https://github.com/automic-vault/db/blob/main/combined/terraform-iam-policy-validator.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
