lib/cfer.rb
# Creates or updates a CloudFormation stack
# @param stack_name [String] The name of the stack to update
# @param options [Hash]
Creates or updates a CloudFormation stack
Creates or updates a CloudFormation stack
def delete!(stack_name, options = {})
      config(options)
      cfn = options[:aws_options] || {}
      cfn_stack = options[:cfer_client] || cfn_stack = Cfer::Cfn::Client.new(cfn.merge(stack_name: stack_name))
      delete_opts = {
        stack_name: stack_name
      }
      delete_opts[:role_arn] = options[:role_arn] if options[:role_arn]
      cfn_stack.delete_stack(delete_opts)
      if options[:follow]
        tail! stack_name, options.merge(cfer_client: cfn_stack)
      end
    rescue Aws::CloudFormation::Errors::ValidationError => e
      if e.message =~ /Stack .* does not exist/
        raise Cfer::Util::StackDoesNotExistError, e.message
      else
        raise e
      end
    end
def delete! ( stack_name , options = { } ) config ( options ) cfn = options [ :aws_options ] || { } cfn_stack = options [ :cfer_client ] || cfn_stack = Cfer :: Cfn :: Client . new ( cfn . merge ( stack_name : stack_name ) ) delete_opts = { stack_name : stack_name } delete_opts [ :role_arn ] = options [ :role_arn ] if options [ :role_arn ] cfn_stack . delete_stack ( delete_opts ) if options [ :follow ] tail! stack_name , options . merge ( cfer_client : cfn_stack ) end rescue Aws :: CloudFormation :: Errors :: ValidationError => e if e . message =~ / Stack .* does not exist / raise Cfer :: Util :: StackDoesNotExistError , e . message else raise e end end
Creates or updates a CloudFormation stack
Creates or updates a CloudFormation stack
stack_name
The name of the stack to update
The name of the stack to update
options
<not_specific>
<not_specific>
None