Destroying Provisioned Infrastructure

First, remove autoscaling groups (ASG) deployed via CodeDeploy manually since Terraform doesn't track them and will miss them during the automatic destroy process. Once ASG is deleted you can use the ansible-playbook destroy.yml playbook to remove the rest of the generated infrastructure.

Make sure to check the playbook output since in some cases it may not delete everything. Check the error description for details.

Changing the backend variable will force Terraform to forget about created infrastructure, since it will start searching the current state files locally instead of remotely.

Last updated

Was this helpful?