0.1.22 • Published 6 months ago

@cloud-copilot/iam-convert v0.1.22

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

6 months ago

0.1.21

6 months ago

0.1.20

7 months ago

0.1.19

7 months ago

0.1.18

7 months ago

0.1.17

7 months ago

0.1.16

8 months ago

0.1.15

8 months ago

0.1.14

8 months ago

0.1.13

8 months ago

0.1.12

8 months ago

0.1.11

8 months ago

0.1.10

9 months ago

0.1.9

9 months ago

0.1.8

10 months ago

0.1.7

10 months ago

0.1.6

10 months ago

0.1.5

11 months ago

0.1.4

11 months ago

0.1.3

11 months ago

0.1.2

11 months ago

0.1.1

11 months ago