Sha256: 6146d3688ca8c6aec7c3f016d74f80976ba77e1977ca750bf6812ca1c03c54fb

Contents?: true

Size: 654 Bytes

Versions: 15

Compression:

Stored size: 654 Bytes

Contents

module Jets
  module Command
    module AwsHelpers # :nodoc:
      extend ActiveSupport::Concern

      include Jets::AwsServices

      def first_run?
        return false if ENV['JETS_TEMPLATES']
        !stack_exists?(Jets::Names.parent_stack_name)
      end

      def find_stack(stack_name)
        resp = cfn.describe_stacks(stack_name: stack_name)
        resp.stacks.first
      rescue Aws::CloudFormation::Errors::ValidationError => e
        # example: Stack with id demo-dev does not exist
        if e.message =~ /Stack with/ && e.message =~ /does not exist/
          nil
        else
          raise
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
jets-5.0.13 lib/jets/command/aws_helpers.rb
jets-5.0.12 lib/jets/command/aws_helpers.rb
jets-5.0.11 lib/jets/command/aws_helpers.rb
jets-5.0.10 lib/jets/command/aws_helpers.rb
jets-5.0.9 lib/jets/command/aws_helpers.rb
jets-5.0.8 lib/jets/command/aws_helpers.rb
jets-5.0.7 lib/jets/command/aws_helpers.rb
jets-5.0.6 lib/jets/command/aws_helpers.rb
jets-5.0.5 lib/jets/command/aws_helpers.rb
jets-5.0.4 lib/jets/command/aws_helpers.rb
jets-5.0.3 lib/jets/command/aws_helpers.rb
jets-5.0.2 lib/jets/command/aws_helpers.rb
jets-5.0.1 lib/jets/command/aws_helpers.rb
jets-5.0.0 lib/jets/command/aws_helpers.rb
jets-5.0.0.beta1 lib/jets/command/aws_helpers.rb