Terraform
The tf-migrate stacks cleanup deletes a deployed Terraform Stack from HCP Terraform. This command only deletes the Stack configuration from your HCP Terraform organization, it does not destroy the resources it manages. For inforamtion on how to destroy resources managed by a Stack, refer to the Destroy a Stack documentation.
Usage
$ tf-migrate stacks cleanup [options]
Description
The tf-migrate stacks cleanup command deletes a deployed Stack from HCP Terraform. This command does not delete the associated resources.
You can retrieve the Stack ID from the Stack Settings page in HCP Terraform.
Example
The example below uses the tf-migrate stacks cleanup command to delete a Stack by ID. Since the example does not specify a Stack ID with the -stackId flag, tf-migrate asks you to provide one.
$ tf-migrate stacks cleanup
Please enter the Stack ID to delete: st-ab1CDefGHijKlmNo
✓ Using provided stack ID: st-ab1CDefGHijKlmNo
✓ Successfully deleted stack with ID: st-ab1CDefGHijKlmNo
Available options
You can include the following flags when you run the tf-migrate execute command:
| Option | Description | Default | Required |
|---|---|---|---|
-stackId | The ID of the Stack to delete | None | No |