Sha256: 7b386e0441494d4cb6d2e1e74fd6e1e03323298e850bb87278ab3ff70d9fb390

Contents?: true

Size: 920 Bytes

Versions: 13

Compression:

Stored size: 920 Bytes

Contents

require "stackup/stack"
require "swa/resource"
require "yaml"

module Swa
  module CloudFormation

    class Stack < Resource

      def id
        name
      end

      def summary
        [
          pad(name, 44),
          pad(stack.stack_status, 24),
          last_modified_at.iso8601
        ].join("  ")
      end

      delegate :name

      def last_modified_at
        stack.last_updated_time || stack.creation_time
      end

      def template_body
        stackup_stack.template_body
      end

      def template_data
        stackup_stack.template
      end

      def parameters
        stackup_stack.parameters
      end

      def outputs
        stackup_stack.outputs
      end

      def resources
        stackup_stack.resources
      end

      private

      alias_method :stack, :aws_resource

      def stackup_stack
        Stackup::Stack.new(name, stack.client)
      end

    end

  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
swa-0.8.3 lib/swa/cloud_formation/stack.rb
swa-0.8.2 lib/swa/cloud_formation/stack.rb
swa-0.8.1 lib/swa/cloud_formation/stack.rb
swa-0.8.0 lib/swa/cloud_formation/stack.rb
swa-0.7.7 lib/swa/cloud_formation/stack.rb
swa-0.7.6 lib/swa/cloud_formation/stack.rb
swa-0.7.5 lib/swa/cloud_formation/stack.rb
swa-0.7.4 lib/swa/cloud_formation/stack.rb
swa-0.7.3 lib/swa/cloud_formation/stack.rb
swa-0.7.2 lib/swa/cloud_formation/stack.rb
swa-0.7.1 lib/swa/cloud_formation/stack.rb
swa-0.7.0 lib/swa/cloud_formation/stack.rb
swa-0.6.1 lib/swa/cloud_formation/stack.rb