When this flag is set Terragrunt will delete the backend state for all units discovered in the current working directory.
Environment Variables:
TG_ALL
Delete backend state used by a unit.
Delete backend state for the current unit.
terragrunt backend deleteDelete backend state for the current unit without confirmation.
terragrunt backend delete --non-interactiveDelete backend state for the current unit, even if it doesn't have versioning enabled.
terragrunt backend delete --forceUsing this command deletes the backend state file for the current Terragrunt unit.
For example, given the following remote_state block:
remote_state { backend = "s3" config = { bucket = "mybucket" key = "path/to/my/key" region = "us-east-1" encrypt = true
dynamodb_table = "tf-lock"
accesslogging_bucket_name = "mybucket-logs" }}Running terragrunt backend delete will delete the backend state file located at path/to/my/key in the mybucket bucket.
remote_state { backend = "azurerm" config = { resource_group_name = "my-tofu-state" storage_account_name = "mytofustate" container_name = "tfstate" key = "path/to/my/key" use_azuread_auth = true }}Running terragrunt backend delete will delete the backend state blob located at path/to/my/key in the tfstate container of the mytofustate storage account.
remote_state { backend = "gcs" config = { project = "my-project" location = "us-central1" bucket = "my-tofu-state" prefix = "path/to/my/prefix" }}Running terragrunt backend delete will delete every object in the my-tofu-state bucket whose name starts with path/to/my/prefix. That includes the state of every workspace under the prefix.
When this flag is set Terragrunt will delete the backend state for all units discovered in the current working directory.
Environment Variables:
TG_ALLPath to the Terragrunt configuration file to use to delete the resources.
Environment Variables:
TG_CONFIGPath to download OpenTofu/Terraform modules into. The default is `.terragrunt-cache`.
Environment Variables:
TG_DOWNLOAD_DIRWhen this flag is set, Terragrunt will delete the backend state regardless of whether the bucket containing it has versioning enabled.
Environment Variables:
TG_FORCE