An open API service indexing awesome lists of open source software.

https://github.com/icy/s3zip

Compress AWS S3 policies and make them maintainable for human being. Compress 1200 lines of Json files into 120 lines of configuration.
https://github.com/icy/s3zip

aws json s3 yaml

Last synced: 5 months ago
JSON representation

Compress AWS S3 policies and make them maintainable for human being. Compress 1200 lines of Json files into 120 lines of configuration.

Awesome Lists containing this project

README

          

[![Build Status](https://travis-ci.org/icy/s3zip.svg?branch=master)](https://travis-ci.org/icy/s3zip)

## TOC

* [Description](#description)
* [Examples](#examples)
* [Installation](#installation)
* [Syntax](#syntax)
* [Why-s3zip](#why-s3zip)
* [Specification](#specification)

## Description

Compress AWS S3 policies and make them maintainable for human being.

Compress 1200 lines of Json files into 120 lines of configuration.

Output in JSON and/or Terraform.
See input examples in `input/` and the output in `output/`.

Please don't use this tool if you are not a human.

## Examples

See more in [Examples](examples/) directory.

Input policy:

```
- user: "arn:aws:iam::${var.example_production_account_id}:root"
env: [dev]
do:
- perm: ALL
bucket: ["${aws_s3_bucket.some_bucket_for_production.id}"]
```

Output `Terraform` files

```
# ENVS: AUTO_GENERATED/{dev}
# FILE: dev___aws_s3_bucket_some_bucket_for_production_id__override.tf
# WARNING: Don't change this file manually
resource "aws_s3_bucket_policy" "s3_bucket_policy_dev___aws_s3_bucket_some_bucket_for_production_id_" {
bucket = "${aws_s3_bucket.some_bucket_for_production.id}"
policy = <