class RubyTerraform::Commands::Taint

Wraps the +terraform taint+ command which marks a resource instance as not fully functional.

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 this command.

This will not modify your infrastructure directly, but subsequent Terraform plans will include actions to destroy the remote object and create a new object to replace it.

You can remove the “taint” state from a resource instance using the {Untaint} command.

The address is in the usual resource address syntax, such as:

Use your shell's quoting or escaping syntax to ensure that the address will reach Terraform correctly, without any special interpretation.

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

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

@example Basic Invocation

RubyTerraform::Commands::Taint.new.execute(
  address: 'aws_security_group.allow_all')

Public Instance Methods

arguments(parameters) click to toggle source

@!visibility private

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

@!visibility private

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

@!visibility private

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

@!visibility private

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