Module: RubyTerraform::ClassMethods

Included in:
RubyTerraform
Defined in:
lib/ruby_terraform.rb

Instance Method Summary collapse

Instance Method Details

#apply(opts = {}) ⇒ Object



42
43
44
# File 'lib/ruby_terraform.rb', line 42

def apply(opts = {})
  Commands::Apply.new.execute(opts)
end

#clean(opts = {}) ⇒ Object



22
23
24
# File 'lib/ruby_terraform.rb', line 22

def clean(opts = {})
  Commands::Clean.new.execute(opts)
end

#destroy(opts = {}) ⇒ Object



46
47
48
# File 'lib/ruby_terraform.rb', line 46

def destroy(opts = {})
  Commands::Destroy.new.execute(opts)
end

#get(opts = {}) ⇒ Object



30
31
32
# File 'lib/ruby_terraform.rb', line 30

def get(opts = {})
  Commands::Get.new.execute(opts)
end

#init(opts = {}) ⇒ Object



26
27
28
# File 'lib/ruby_terraform.rb', line 26

def init(opts = {})
  Commands::Init.new.execute(opts)
end

#output(opts = {}) ⇒ Object



58
59
60
# File 'lib/ruby_terraform.rb', line 58

def output(opts = {})
  Commands::Output.new.execute(opts)
end

#output_from_remote(opts) ⇒ Object



66
67
68
69
70
71
72
73
# File 'lib/ruby_terraform.rb', line 66

def output_from_remote(opts)
  output_name = opts[:name]
  remote_opts = opts[:remote]

  clean
  remote_config(remote_opts)
  output(name: output_name)
end

#plan(opts = {}) ⇒ Object



38
39
40
# File 'lib/ruby_terraform.rb', line 38

def plan(opts = {})
  Commands::Plan.new.execute(opts)
end

#refresh(opts = {}) ⇒ Object



54
55
56
# File 'lib/ruby_terraform.rb', line 54

def refresh(opts = {})
  Commands::Refresh.new.execute(opts)
end

#remote_config(opts = {}) ⇒ Object



50
51
52
# File 'lib/ruby_terraform.rb', line 50

def remote_config(opts = {})
  Commands::RemoteConfig.new.execute(opts)
end

#validate(opts = {}) ⇒ Object



34
35
36
# File 'lib/ruby_terraform.rb', line 34

def validate(opts = {})
  Commands::Validate.new.execute(opts)
end

#workspace(opts = {}) ⇒ Object



62
63
64
# File 'lib/ruby_terraform.rb', line 62

def workspace(opts = {})
  Commands::Workspace.new.execute(opts)
end