func (c *Client) Destroy(ctx context.Context) ([]byte, error) {
	cmd := c.setup(ctx, []string{"destroy", "-auto-approve", c.rootDir})
	return c.run(cmd)
}
Destroy runs terraform destroy
package terraform
import (
	"archive/zip"
	"bufio"
	"bytes"
	"context"
	_ "embed"
	"fmt"
	log "github.com/sirupsen/logrus"
	"io"
	"net/http"
	"os"
	"os/exec"
	"path/filepath"
	"runtime"
	"strings"
	"time"
)
const (
	Version = "0.11.15"
	DefaultTerraformDestroyTimeout = time.Minute * 2
)
var (
	darwinBinaryURL  = fmt.Sprintf("https://releases.hashicorp.com/terraform/%s/terraform_%s_darwin_amd64.zip", Version, Version)
	linuxBinaryURL   = fmt.Sprintf("https://releases.hashicorp.com/terraform/%s/terraform_%s_linux_amd64.zip", Version, Version)
	windowsBinaryURL = fmt.Sprintf("https://releases.hashicorp.com/terraform/%s/terraform_%s_windows_amd64.zip", Version, Version)
)
type Client struct {
	rootDir             string
	terraformBinaryFile string
}
func New(rootDir string) (*Client, error) {
	terraformBinary, err := setupBinary(rootDir)
	if err != nil {
		return nil, err
	}
	client := &Client{
		rootDir:             rootDir,
		terraformBinaryFile: terraformBinary,
	}
	return client, nil
}
func (c *Client) Apply(ctx context.Context) ([]byte, error) {
	output, err := c.init(ctx)
	if err != nil {
		return output, err
	}
	cmd := c.setup(ctx, []string{"apply", "-auto-approve", c.rootDir})
	return c.run(cmd)
}