class RubyTerraform::Commands::Untaint

Wraps the +terraform untaint+ command which removes the 'tainted' state from a resource instance.

Terraform uses the term “tainted” to describe a resource instance which may not be fully functional, either because its creation partially failed or because you've manually marked it as such using the {Taint} command.

This command removes that state from a resource instance, causing Terraform to see it as fully-functional and not in need of replacement.

This will not modify your infrastructure directly. It only avoids Terraform planning to replace a tainted instance in a future operation.

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

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

@example Basic Invocation

RubyTerraform::Commands::Untaint.new.execute(
  name: 'aws_security_group.allow_all')

Public Instance Methods

arguments(parameters) click to toggle source

@!visibility private

# File lib/ruby_terraform/commands/untaint.rb, line 80
def arguments(parameters)
  [parameters[:name]]
end
options() click to toggle source

@!visibility private

Calls superclass method RubyTerraform::Options::Global#options
# File lib/ruby_terraform/commands/untaint.rb, line 66
def options
  %w[
    -allow-missing
    -backup
    -lock
    -lock-timeout
    -no-color
    -state
    -state-out
    -ignore-remote-version
  ] + super
end
parameter_overrides(parameters) click to toggle source

@!visibility private

# File lib/ruby_terraform/commands/untaint.rb, line 85
def parameter_overrides(parameters)
  { backup: parameters[:no_backup] ? '-' : parameters[:backup] }
end
subcommands() click to toggle source

@!visibility private

# File lib/ruby_terraform/commands/untaint.rb, line 61
def subcommands
  %w[untaint]
end