class AwsRds::Create

Public Class Methods

new(options) click to toggle source
# File lib/aws_rds/create.rb, line 10
def initialize(options)
  @options = options
end

Public Instance Methods

params() click to toggle source
# File lib/aws_rds/create.rb, line 27
def params
  @params ||= Params.new(@options).generate
end
pretty_display(data) click to toggle source
# File lib/aws_rds/create.rb, line 31
def pretty_display(data)
  data = data.deep_stringify_keys
  puts YAML.dump(data)
end
run() click to toggle source
# File lib/aws_rds/create.rb, line 14
def run
  puts "Creating RDS database #{@options[:name]} with the following parameters:"
  pretty_display(params)
  if @options[:noop]
    puts "NOOP mode enabled. RDS instance not created."
    return
  end

  resp = rds.create_db_instance(params)
  puts "RDS database #{@options[:name]} created! 🎉"
  puts "Visit https://console.aws.amazon.com/rds/home?#dbinstances to check on the status"
end