Class: Jets::Cfn::Stack

Inherits:
Object
  • Object
show all
Extended by:
Memoist
Includes:
AwsServices, Deployable, Rollback, Util::Logging
Defined in:
lib/jets/cfn/stack.rb,
lib/jets/cfn/stack/yamler.rb,
lib/jets/cfn/stack/rollback.rb,
lib/jets/cfn/stack/template.rb,
lib/jets/cfn/stack/deployable.rb

Direct Known Subclasses

Delete, Deploy, Rollback, Teardown

Defined Under Namespace

Modules: Deployable, Rollback Classes: Template, Yamler

Instance Method Summary collapse

Methods included from Deployable

#check_deployable!

Methods included from Rollback

#continue_update_rollback!, #delete_rollback_complete!, #rollback_complete?, #update_rollback_failed?

Methods included from Util::Logging

#log

Methods included from AwsServices::AwsHelpers

#find_stack

Methods included from AwsServices

#apigateway, #aws_options, #cfn, #codebuild, #dynamodb, #lambda_client, #logs, #s3, #s3_resource, #sns, #sqs, #ssm, #sts, #wafv2

Methods included from AwsServices::StackStatus

#output_value, #stack_exists?

Methods included from AwsServices::GlobalMemoist

included, #reset_cache!

Constructor Details

#initialize(options) ⇒ Stack

Returns a new instance of Stack.



9
10
11
# File 'lib/jets/cfn/stack.rb', line 9

def initialize(options)
  @options = options
end

Instance Method Details

#check_stack_exist!Object



17
18
19
20
21
22
# File 'lib/jets/cfn/stack.rb', line 17

def check_stack_exist!
  stack = find_stack(stack_name)
  return if stack
  puts "ERROR: Stack #{stack_name} does not exist".color(:red)
  exit 1
end

#stack_nameObject



13
14
15
# File 'lib/jets/cfn/stack.rb', line 13

def stack_name
  Jets.project.namespace
end