Documentation
¶
Overview ¶
terraform-permcheck validates that a terraform deploy role has sufficient IAM permissions for every resource in a terraform plan.
Usage:
terraform show -json plan.tfplan | terraform-permcheck validate --policy-file deploy_policy.json --cloud aws terraform-permcheck validate --plan-file plan.json --policy-file deploy_policy.json --cloud aws terraform show -json plan.tfplan | terraform-permcheck validate --policy-from-plan-output deploy_policy_json --cloud aws terraform-permcheck validate --plan-file plan.json --policy-from-state-output deploy_policy_json --state-file state.json --cloud aws terraform-permcheck validate --terraform-root ./terraform --policy-file deploy_policy.json --cloud aws
GitHub Actions annotations (warn, don't fail):
terraform show -json plan.tfplan | terraform-permcheck validate \ --policy-file deploy_policy.json --cloud aws \ --format github-annotations --exit-zero # With file/line annotations (inline in the PR "Files changed" tab): terraform show -json plan.tfplan | terraform-permcheck validate \ --policy-file deploy_policy.json --cloud aws \ --format github-annotations --terraform-root . --exit-zero
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
cloud
Package cloud defines the interface for cloud schema registries and provides implementations for AWS, GCP, and Azure.
|
Package cloud defines the interface for cloud schema registries and provides implementations for AWS, GCP, and Azure. |
|
hcl
Package hcl provides a static HCL parser that extracts resource and data block types from terraform configuration files without running terraform plan.
|
Package hcl provides a static HCL parser that extracts resource and data block types from terraform configuration files without running terraform plan. |
|
iam
Package iam parses IAM policy documents and validates that required permissions are covered.
|
Package iam parses IAM policy documents and validates that required permissions are covered. |
|
plan
Package plan parses terraform plan JSON output from `terraform show -json plan.tfplan`.
|
Package plan parses terraform plan JSON output from `terraform show -json plan.tfplan`. |
|
provideraws
Package provideraws parses terraform-provider-aws Go source files to extract the exact AWS SDK API calls required by each resource type.
|
Package provideraws parses terraform-provider-aws Go source files to extract the exact AWS SDK API calls required by each resource type. |
Click to show internal directories.
Click to hide internal directories.