Project

mappru

0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Mappru is a tool to manage VPC Route Table.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 3.0

Runtime

 Project Readme

Mappru

Mappru is a tool to manage VPC Route Table.

It defines the state of VPC Route Table using DSL, and updates VPC Route Table according to DSL.

Installation

Add this line to your application's Gemfile:

gem 'mappru'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mappru

Usage

export AWS_ACCESS_KEY_ID='...'
export AWS_SECRET_ACCESS_KEY='...'
mappru -e -o Routetable  # export VPC Route Table
vi PolicyFile
mappru -a --dry-run
mappru -a                # apply `Routetable`

Help

Usage: mappru [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
        --vpc-id REGEXP
        --rt-name REGEXP
        --no-color
        --debug

Routetable example

require 'other/tablefile'

vpc "vpc-12345678" do
  route_table "foo-rt" do
    subnets "subnet-12345678"
    route destination_cidr_block: "0.0.0.0/0", gateway_id: "igw-12345678"
    route destination_cidr_block: "192.168.100.101/32", network_interface_id: "eni-12345678"

    # Ignore changes in routes to specific destinations
    route destination_cidr_block: "192.168.100.200/32", ignore: true
  end

  route_table "bar-rt" do
    subnets "subnet-87654321"
    route destination_cidr_block: "192.168.100.102/32", network_interface_id: "eni-87654321"
  end

  # Undefined Route Table will be ignored
end

# Undefined VPC will be ignored

Similar tools