☰ Menu
Home›DevOps & Cloud›terraform-iam-policy-validator
CLI Open source 20 installs/mo Up 1.85×

terraform-iam-policy-validator for Mac

terraform-iam-policy-validator

IAM Policy Validator for Terraform A command line tool that takes a Terraform template, parses IAM identity-based and resource-based policies, then runs them through IAM Access Analyzer policy validation checks and (opti…

terraform-iam-policy-validator — overview

IAM Policy Validator for Terraform A command line tool that takes a Terraform template, parses IAM identity-based and resource-based policies, then runs them through IAM Access Analyzer policy validation checks and (optionally) through IAM Access Analyzer custom policy checks. Note that a charge is associated with each custom policy check. For more details about pricing, see IAM Access Analyzer pricing.

Pre-requisites Getting Started Limitations Frequently Asked Questions Contributors

Getting Started

Installation Python 3+ is supported.

Credentials The tool should be run using credentials from the AWS account that you plan to deploy terraform template to. The tool uses boto3 to interact with your AWS account. You can use one of the following methods to specify credentials: Environment variables Shared credential file (~/.aws/credentials) AWS config file (~/.aws/config) Assume Role provider Instance metadata service on an Amazon EC2 instance that has an IAM role configured.

The principal used to execute the tool requires the following permissions.

Basic usage

Commands validate

Parses IAM identity-based and resource-based policies from Terraform templates. Then runs the policies through IAM Access Analyzer for validation. Returns the findings from validation in JSON format. Exits with a non-zero error code if any findings categorized as blocking are found in your template. Exits with an error code of zero if all findings are non-blocking or there are no findings.

| --ignore-finding | | FINDING_CODE, RESOURCE_NAME, RESOURCE_NAME.FINDING_CODE | Allow validation failures to be ignored. Specify as a comma separated list of findings to be ignored. Can be individual finding codes (e.g. "PASS_ROLE_WITH_STAR_IN_RESOURCE"), a specific resource name (e.g. "MyResource"), or a combination of both separated by a period.(e.g. "MyResource.PASS_ROLE_WITH_STAR_IN_RESOURCE"). Names of finding codes may change in IAM Access Analyzer over time.

check-no-new-access

Parses IAM identity-based and resource-based policies from Terraform templates. Then runs the policies through IAM Access Analyzer for a custom check against a reference policy. Returns the findings from the custom check in JSON format. Exits with a non-zero error code if any findings categorized as blocking, based on new access, are found in your template. Exits with an error code of zero if all findings are non-blocking or there are no findings. You can find examples for reference policies and learn how to set up and run a custom policy check for new access in the IAM Access Analyzer custom policy checks samples repository on GitHub.

check-access-not-granted

Details

用于验证 Terraform 模板中 AWS IAM 策略最佳实践的 CLI

How to install terraform-iam-policy-validator

  1. Open Terminal (press ⌘ + Space and type “Terminal”).
  2. If Homebrew is not installed yet, run the command below first.
  3. Run this command:

Latest 10 releases

Last updated 2025-06-09; current version v0.0.9, with the latest 4 releases listed.

VersionReleasedTypeSizemacOSWindowsLinux
v0.0.92025-06-09Stable————
v0.0.82024-06-11Stable————
v0.0.72024-05-21Stable————
v0.0.62024-04-01Stable————

Data from GitHub Releases; stable releases first, each group sorted newest first.

Prebuilt bottle platforms

Official Homebrew bottles cover:

  • Apple silicon · latest macOS
  • Apple silicon · macOS 26 Tahoe
  • Apple silicon · macOS 15 Sequoia
  • Linux · ARM64
  • Linux · x86_64

⚠️ No prebuilt bottle for Intel Macs; Intel users need brew install --build-from-source to build from source.

Compared with similar apps

Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.

Compared with similar apps
AppVersionLicenseArchitecture30-day installs
terraform-iam-policy-validatorv0.0.9MIT-0CLI20
parliament1.64BSD-3-ClauseCLI14
e1sv2.0.0MITCLI19
netfetchv0.5.4MITCLI22

Similar apps: DevOps & Cloud

Leave a comment

评论表单加载中…