Repol is a tool to manage ECR Repository Policy.
Ruby Shell
Latest commit e8252fa Sep 8, 2016 @winebarrel winebarrel Fix gem dependency
Permalink
Failed to load latest commit information.
bin
exe Fix region Aug 18, 2016
lib
spec v0.1.0 May 21, 2016
.gitignore fix default file name May 22, 2016
.rspec v0.1.0 May 21, 2016
.travis.yml v0.1.0 May 21, 2016
Gemfile
LICENSE.txt v0.1.0 May 21, 2016
README.md
Rakefile
repol.gemspec

README.md

Repol

Repol is a tool to manage ECR Repository Policy.

It defines the state of ECR Repository Policy using DSL, and updates ECR Repository Policy according to DSL.

Installation

Add this line to your application's Gemfile:

gem 'repol'

And then execute:

$ bundle

Or install it yourself as:

$ gem install repol

Usage

export AWS_ACCESS_KEY_ID='...'
export AWS_SECRET_ACCESS_KEY='...'
repol -e -o Repolfile  # export Repository Policy
vi Repolfile
repol -a --dry-run
repol -a               # apply `Repolfile`

Help

Usage: repol [options]
    -k, --access-key ACCESS_KEY
    -s, --secret-key SECRET_KEY
    -r, --region REGION
        --profile PROFILE
        --credentials-path PATH
    -a, --apply
    -f, --file FILE
        --dry-run
    -e, --export
    -o, --output FILE
        --split
        --target REGEXP
        --no-color
        --debug
        --request-concurrency N

Repolfile example

require 'other/repolfile'

repository "my_ecr_repo" do
  {"Version"=>"2008-10-17",
   "Statement"=>
    [{"Sid"=>"PullOnly",
      "Effect"=>"Allow",
      "Principal"=>{"AWS"=>"arn:aws:iam::123456789012:root"},
      "Action"=>
       ["ecr:BatchCheckLayerAvailability",
        "ecr:BatchGetImage",
        "ecr:GetDownloadUrlForLayer"]}]}
end

Similar tools