Method: Stax::Stack#protection

Defined in:
lib/stax/stack/crud.rb

#protectionObject



252
253
254
255
256
257
258
259
260
# File 'lib/stax/stack/crud.rb', line 252

def protection
  if options[:enable]
    Aws::Cfn.protection(stack_name, true)
  elsif options[:disable]
    Aws::Cfn.protection(stack_name, false)
  end
  debug("Termination protection for #{stack_name}")
  puts Aws::Cfn.describe(stack_name)&.enable_termination_protection
end