0.1.22 • Published 11 months ago

@cloud-copilot/iam-convert v0.1.22

Weekly downloads
-
License
AGPL-3.0-or-later
Repository
github
Last release
11 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

11 months ago

0.1.21

11 months ago

0.1.20

12 months ago

0.1.19

12 months ago

0.1.18

12 months ago

0.1.17

1 year ago

0.1.16

1 year ago

0.1.15

1 year ago

0.1.14

1 year ago

0.1.13

1 year ago

0.1.12

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago