Class: RSpec::Terraform::Helpers::Destroy

Inherits:
Base
  • Object
show all
Includes:
Actions::Clean, Actions::Destroy, Actions::ExecuteIfRequired, Actions::Init, Actions::Validate
Defined in:
lib/rspec/terraform/helpers/destroy.rb

Instance Attribute Summary

Attributes inherited from Base

#binary, #configuration_provider, #execution_mode, #logger, #stderr, #stdin, #stdout

Instance Method Summary collapse

Methods included from Actions::Destroy

#destroy

Methods included from Actions::CommandInstantiation

#instantiate_command

Methods included from Actions::Init

#init

Methods included from Actions::Clean

#clean

Methods included from Actions::Validate

#validate

Methods included from Actions::ExecuteIfRequired

#execute_if_required

Methods inherited from Base

#initialize

Methods included from Parameters

#resolve_parameters, #with_configuration_provider_parameters, #with_mandatory_parameters, #with_resolved_vars

Constructor Details

This class inherits a constructor from RSpec::Terraform::Helpers::Base

Instance Method Details

#execute(overrides = {}) ⇒ Object



18
19
20
21
22
23
24
25
26
27
# File 'lib/rspec/terraform/helpers/destroy.rb', line 18

def execute(overrides = {}, &)
  parameters = resolve_parameters(overrides, &)

  execute_if_required(:destroy, parameters) do
    validate(parameters)
    clean(parameters)
    init(parameters)
    destroy(parameters)
  end
end