/iam-policy-json-to-terraform

Small tool to convert an IAM Policy in JSON format into a Terraform aws_iam_policy_document

Primary LanguageGoApache License 2.0Apache-2.0

iam-policy-json-to-terraform

Build StatusRelease

Small tool to convert an IAM Policy in JSON format into a Terraform aws_iam_policy_document

Installation

Download the latest binary from the releases page and put it into your PATH under the name iam-policy-json-to-terraform

Usage

$ iam-policy-json-to-terraform < some-policy.json

Local development

Prerequisites

  • Install dep:

    $ curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
  • Clone the repository to the right location in the$GOPATH:

    $ mkdir -p $GOPATH/src/github.com/flosell/
    $ cd $GOPATH/src/github.com/flosell/
    $ git clone  git@github.com:flosell/iam-policy-json-to-terraform.git
  • Install dependencies and tools:

    $ cd $GOPATH/src/github.com/flosell/iam-policy-json-to-terraform
    $ make vendor tools

Development

make is your primary point of entry for any development activity. Call it without arguments to learn more:

$ make
build                          Test and build the whole application
clean                          Remove build artifacts and vendored dependencies
fmt                            Format code
fmtcheck                       Run linter
test                           Run all tests
tools                          Install additional required tooling
vendor                         Install dependencies into ./vendor