class RubyTerraform::Commands::ForceUnlock

Wraps the +terraform force-unlock+ command which manually unlocks the state for the defined configuration.

This will not modify your infrastructure. This command removes the lock on the state for the current workspace. The behavior of this lock is dependent on the backend being used. Local state files cannot be unlocked by another process.

For options accepted on construction, see {#initialize}.

When executing an instance of {ForceUnlock} via {#execute}, the following options are supported:

@example Basic Invocation

RubyTerraform::Commands::ForceUnlock.new.execute(
  lock_id: '50e844a7-ebb0-fcfd-da85-5cce5bd1ec90')

Public Instance Methods

arguments(parameters) click to toggle source

@!visibility private

# File lib/ruby_terraform/commands/force_unlock.rb, line 49
def arguments(parameters)
  [parameters[:lock_id], parameters[:directory]]
end
options() click to toggle source

@!visibility private

Calls superclass method RubyTerraform::Options::Global#options
# File lib/ruby_terraform/commands/force_unlock.rb, line 44
def options
  %w[-force] + super
end
subcommands() click to toggle source

@!visibility private

# File lib/ruby_terraform/commands/force_unlock.rb, line 39
def subcommands
  %w[force-unlock]
end