GithubHelp home page GithubHelp logo

yutadayo / acmaker Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 17 KB

Acmaker is a tool to manage AWS Certificate Manager (ACM). It defines the state of ACM using DSL, and updates ACM according to DSL.

License: MIT License

Ruby 99.32% Shell 0.68%

acmaker's Introduction

Acmaker

Build Status

Acmaker is a tool to manage AWS Certificate Manager It defines the state of Certificate Manager using DSL, and updates Certificate Manager according to DSL.

Installation

Add this line to your application's Gemfile:

gem 'acmaker'

And then execute:

$ bundle

Or install it yourself as:

$ gem install acmaker

Usage

export AWS_ACCESS_KEY_ID='...'
export AWS_SECRET_ACCESS_KEY='...'
export AWS_REGION='...'
acmaker -e -o Certificatefile # export Certificate Manager
vi Certificatefile
acmaker -a --dry-run
acmaker -a            # Apply `Certificatefile` to Certificate Manager

Help

Usage: acmaker [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

Certificatefile example

require 'other/certificatefile'

domain "yutadayo.jp" do
  {:certificate_arn=>
    "arn:aws:acm:ap-northeast-1:XXXXXXXXXXXX:certificate/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
   :created_at=>"2017-01-01 12:00:00 +0900",
   :domain_name=>"yutadayo.jp",
   :domain_validation_options=>
    [{:domain_name=>"yutadayo.jp",
      :validation_domain=>"yutadayo.jp",
      :validation_emails=>
       ["[email protected]",
        "[email protected]",
        "[email protected]",
        "[email protected]",
        "[email protected]",
        "[email protected]"],
      :validation_status=>"SUCCESS"},
     {:domain_name=>"*.yutadayo.jp",
      :validation_domain=>"yutadayo.jp",
      :validation_emails=>
       ["[email protected]",
        "[email protected]",
        "[email protected]",
        "[email protected]",
        "[email protected]",
        "[email protected]"],
      :validation_status=>"SUCCESS"}],
   :failure_reason=>nil,
   :imported_at=>nil,
   :in_use_by=>
    ["arn:aws:elasticloadbalancing:ap-northeast-1:XXXXXXXXXXXX:loadbalancer/XXXXXXXXXX",
     "arn:aws:elasticloadbalancing:ap-northeast-1:XXXXXXXXXXXX:loadbalancer/app/XXXXXXXXXX/XXXXXXXXXX"],
   :issued_at=>"2017-01-01 13:00:00 +0900",
   :issuer=>"Amazon",
   :key_algorithm=>"RSA-2048",
   :not_after=>"2018-02-01 21:00:00 +0900",
   :not_before=>"2017-01-01 09:00:00 +0900",
   :renewal_summary=>{},
   :revocation_reason=>nil,
   :revoked_at=>nil,
   :serial=>"XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX",
   :signature_algorithm=>"SHA256WITHRSA",
   :status=>"ISSUED",
   :subject=>"CN=yutadayo.jp",
   :subject_alternative_names=>["yutadayo.jp", "*.yutadayo.jp"],
   :type=>"AMAZON_ISSUED"}
end

Create Certificate

$ cat Certificatefile

domain "yutadayo.jp" do
  {
    :domain_name => "yutadayo.jp",
    :subject_alternative_names => ["*.yutadayo.jp"],
    :domain_validation_options => [
      {
        :domain_name => "yutadayo.jp",
        :validation_domain => "yutadayo.jp",
      },
      {
        :domain_name => "*.yutadayo.jp",
        :validation_domain => "yutadayo.jp",
      },
    ],
  }
end

$ acmaker -a

Delete Certificate

$ cat Certificatefile

domain "yutadayo.jp" do
end

$ acmaker -a
$ cat Certificatefile

domain "yutadayo.jp" do
  {}
end

$ acmaker -a
$ cat Certificatefile

# comment out
#domain "yutadayo.jp" do
#  ...
#end

$ acmaker -a

Test

set your AWS arn and domain_name for spec/aws_config.yml.sample and rename to spec/aws_config.yml.

Similar tools

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/yutadayo/acmaker.

License

The gem is available as open source under the terms of the MIT License.

acmaker's People

Contributors

yutadayo avatar

Stargazers

Hidekazu Miyamoto avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.