Skip to main content

Module destroy

Expand description

OpenTofu infrastructure destruction step

This module provides the DestroyInfrastructureStep which handles OpenTofu destroy operations by executing tofu destroy. This step destroys all infrastructure resources managed by the OpenTofu configuration.

§Key Features

  • Infrastructure teardown and resource destruction
  • Configurable auto-approval for automation scenarios
  • Progress tracking and status reporting
  • Integration with OpenTofuClient for command execution

§Destroy Process

The step executes tofu destroy which:

  • Destroys all resources managed by the OpenTofu state
  • Manages resource dependencies and proper destruction order
  • Removes infrastructure state after successful destruction
  • Provides detailed progress and completion status

This step is where actual infrastructure destruction occurs.

Structs§

DestroyInfrastructureStep
Simple step that destroys OpenTofu infrastructure by executing tofu destroy