module Cfnlego

Cfnlego

Cfnlego

Cfnlego

Public Class Methods

resources() click to toggle source
# File lib/cfndsl/cfnlego.rb, line 13
def self.resources
  @resources ||= CfnDsl::Specification.load_file.resources
end
run(options) click to toggle source
# File lib/cfndsl/cfnlego.rb, line 17
def self.run(options)
  resources =
    options[:resources].each_with_object([]) do |r, list|
      /(.*),(.*)/.match(r) do |m|
        type = m[1]
        name = m[2]
        list << Cfnlego::Resource.new(type, name)
      end
    end

  begin
    return Cfnlego::CloudFormation.new(resources).render
  rescue RuntimeError => e
    warn "Error: #{e.message}"
  end
  nil
end