From the course: Advanced Terraform

Unlock the full course today

Join today to access over 23,100 courses taught by industry experts.

Deprecating resources

Deprecating resources - Terraform Tutorial

From the course: Advanced Terraform

Deprecating resources

- [Instructor] In this video, we're going to learn about deprecating resources. Remember, that early in the course, in the destroying resources video, I mentioned that the Terraform destroy CLI command should never be used in a shared environment, especially higher environments like pre-prod and production. That doesn't mean we can't remove resources from those environments. We just need to do it by removing resources from the configuration and redeploying them with plan apply. The Terraform plan CLI command compares the current state to the configuration. When resources in the state are removed from the configuration, the next plan command will include steps to remove those resources. You'll need the resources from the GitHub's CICD video, deployed to your dev and QA environments to follow along. If you destroyed those resources, you can redeploy them in Terraform cloud, just by starting a run in both your dev and QA…

Contents