0.1.22 • Published 4 months ago

@cloud-copilot/iam-convert v0.1.22

Weekly downloads
-
License
AGPL-3.0-or-later
Repository
github
Last release
4 months ago

iam-convert: Convert JSON Policy Documents to Infrastructure as Code

NPM Version License: AGPL v3 GuardDog Known Vulnerabilities

CLI and Node Library to convert JSON IAM Policy Documents to other formats for Infrastructure as Code.

Available Formats

Use in Browser

https://iam.cloudcopilot.io/tools/iam-convert

Installation

# Install the CLI
npm install -g @cloud-copilot/iam-convert

## Install the Node Library
npm install @cloud-copilot/iam-convert

CLI Usage

# Convert a JSON policy document to terraform and send to stdout
iam-convert --file path/to/policy.json

# Download a policy and convert it to terraform
curl "https://government-secrets.s3.amazonaws.com/secret-policy.json" | iam-convert > secret-policy.tf

# View all options
iam-convert --help

Typescript/Javascript Usage

import { convert } from '@cloud-copilot/iam-convert'
import { loadPolicy } from '@cloud-copilot/iam-policy'

const policy = {
  Version: '2012-10-17',
  Statement: [
    {
      Effect: 'Allow',
      Action: 's3:GetObject',
      Resource: 'arn:aws:s3:::my-bucket/*'
    }
  ]
}

const terraformDataSource = convert(policy, 'tf')

console.log(terraformDataSource)
0.1.22

4 months ago

0.1.21

4 months ago

0.1.20

4 months ago

0.1.19

5 months ago

0.1.18

5 months ago

0.1.17

5 months ago

0.1.16

5 months ago

0.1.15

6 months ago

0.1.14

6 months ago

0.1.13

6 months ago

0.1.12

6 months ago

0.1.11

6 months ago

0.1.10

7 months ago

0.1.9

7 months ago

0.1.8

8 months ago

0.1.7

8 months ago

0.1.6

8 months ago

0.1.5

8 months ago

0.1.4

8 months ago

0.1.3

8 months ago

0.1.2

8 months ago

0.1.1

8 months ago