Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid manually modifying source file when destroying #183

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,7 @@ Terraform configuration as usual.

Follow this procedure to delete your deployment.

1. In `main.tf`, change the `terraform_state_backend` module arguments as
follows:
```hcl
module "terraform_state_backend" {
# ...
terraform_backend_config_file_path = ""
force_destroy = true
}
```
1. `terraform apply -target module.terraform_state_backend -auto-approve`.
1. `terraform destroy -target module.terraform_state_backend.local_file.terraform_backend_config -auto-approve`.
This implements the above modifications by deleting the `backend.tf` file
and enabling deletion of the S3 state bucket.
1. `terraform init -force-copy`. Terraform detects that you want to move your
Expand Down