IAM Policy to Terraform
policy_document / jsonencode styles · unmappable fields flagged · local
No upload, no storage
JSON is processed in memory and never sent to a server.
Share via URL fragment
Share links encode data in the # anchor — never sent to a server.
Remember last edit
Optionally keep your last input locally; clear it with one click.
Why use IAM Policy to Terraform
Console to IaC in one step
Paste a policy JSON copied from the AWS console and get Terraform — no hand-typing statement blocks.
Two output styles
An aws_iam_policy_document data source for readable reviews, or jsonencode embedding the whole policy verbatim with zero semantic loss.
Common fields covered
Sid / Effect / Action / NotAction / Resource / Principal / Condition all map, with interpolation characters escaped into HCL-safe form.
No silent drops
Fields policy_document cannot express are named explicitly with a suggestion to switch to jsonencode — never a silently crippled output.
Local · no upload
IAM policies are sensitive configuration; converting entirely in your browser keeps them safe.