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.
- Host: GitHub
- URL: https://github.com/icy/s3zip
- Owner: icy
- Created: 2018-08-15T08:54:25.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-10-17T01:17:53.000Z (over 7 years ago)
- Last Synced: 2025-04-07T13:47:46.309Z (about 1 year ago)
- Topics: aws, json, s3, yaml
- Language: Ruby
- Homepage:
- Size: 32.2 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](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 = <