Sha256: d7e274dc3f4b1aba5fa1fc61d8a299c067fd465dfbc27350d69db82b8e0f3fb7

Contents?: true

Size: 645 Bytes

Versions: 4

Compression:

Stored size: 645 Bytes

Contents

class Lono::Builder::Dsl::Finalizer
  class Configsets < Base
    # Replaces metadata under each logical id resource.
    def run
      dsl = Lono::Builder::Configset::Evaluator.new(@options.merge(cfn: @cfn))
      metadata_map = dsl.evaluate
      metadata_map.each do |logical_id, cs|
        resource = @cfn["Resources"][logical_id]
        unless resource
          puts "WARN: Resources.#{logical_id} not found in the template. Are you sure you specified the correct resource logical id in your configsets.rb?".color(:yellow)
          next
        end

        resource["Metadata"] = cs["Metadata"]
      end

      @cfn
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lono-8.0.0.pre.rc6 lib/lono/builder/dsl/finalizer/configsets.rb
lono-8.0.0.pre.rc5 lib/lono/builder/dsl/finalizer/configsets.rb
lono-8.0.0.pre.rc4 lib/lono/builder/dsl/finalizer/configsets.rb
lono-8.0.0.pre.rc3 lib/lono/builder/dsl/finalizer/configsets.rb