From the course: Introduction to Terraform on Azure
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Destroy resources with CI/CD
From the course: Introduction to Terraform on Azure
Destroy resources with CI/CD
- [Instructor] We've built powerful Terraform deployments with CICD pipelines. Now it's time to implement a safe way to tear down environments when needed, without accidentally destroying our production resources. The simplest approach, which is commenting our models, has a major flaw. Our pipeline will destroy resources in all environments, including production. So we need to implement a safe way to destroy our resources. Navigate to your Azure pipelines. And on the right side, click the LFCs and select the dates. I'll hide the assistant. And after the PR section, I'll pace two parameters. These dwell parameters ensure deliberate action. You must select an environment and type destroy in all caps to proceed with the terraform destroy oppression. Notice the environment to destroy parameter limits choices to only dev and staging, while production is deliberately excluded. This is done to prevent accidental execution. Now I'll scroll to the end of this file and create two new lines and…
Contents
-
-
-
-
-
-
-
(Locked)
Introduction to CI/CD for Terraform5m 23s
-
Configure and clone your DevOps project6m 23s
-
(Locked)
Configure service principal and variable groups8m 8s
-
(Locked)
Define CI workflow for Terraform9m 39s
-
(Locked)
Define environments and dev CD workflow11m 25s
-
(Locked)
Automating deployments in Azure: Staging and production9m 24s
-
(Locked)
Approval gate for production workflow3m 22s
-
(Locked)
Destroy resources with CI/CD12m 9s
-
(Locked)
-