--all
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 delete
Delete backend state for the current unit without confirmation.
terragrunt backend delete --non-interactive
Delete backend state for the current unit, even if it doesn't have versioning enabled.
terragrunt backend delete --force
Using 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.
--all
When this flag is set Terragrunt will delete the backend state for all units discovered in the current working directory.
Environment Variables:
TG_ALL
--config
Path to the Terragrunt configuration file to use to delete the resources.
Environment Variables:
TG_CONFIG
--download-dir
Path to download OpenTofu/Terraform modules into. The default is `.terragrunt-cache`.
Environment Variables:
TG_DOWNLOAD_DIR
--force
When this flag is set, Terragrunt will delete the backend state regardless of whether the bucket containing it has versioning enabled.
Environment Variables:
TG_FORCE