iam-policy-json-to-terraform

Convert JSON IAM policies to Terraform HCL format

brewmacoslinux
Try with needOr install directly
Source

About

Convert a JSON IAM Policy into terraform

Commands

iam-policy-json-to-terraform

Examples

Convert a JSON policy file to Terraform$ iam-policy-json-to-terraform < policy.json
Convert inline JSON policy and save to file$ iam-policy-json-to-terraform '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":"s3:*","Resource":"*"}]}' > main.tf
Convert policy from AWS CLI output$ aws iam get-role-policy --role-name MyRole --policy-name MyPolicy --query PolicyDocument | iam-policy-json-to-terraform