How to use the terraform lifecycle block to protect your resources

preview_player
Показать описание
The terraform lifecycle block allows for you to protect your resources from accidental deletion. This video goes over three different terraform lifecycle block meta-arguments such as:

Create_before_destroy
Prevent_destroy
Ignore_changes

Once you start to use some of these blocks in your terraform code, you will start to make your code a lot more resilient to accidental changes..

ABOUT OUR CHANNEL
My channel covers various topics about networking, automation and cloud technologies . We cover lots of cool stuff such as cisco, terraform, aws, firewalls, security and more
Check out my channel here:
Don’t forget to subscribe!

CHECK OUT MY OTHER VIDEOS on Terraform Here:

FIND MY BLOG AT

GET IN TOUCH
Рекомендации по теме
Комментарии
Автор

Thank U so much, u made an excellent explanation.
Maybe if u want, u could do an update with the "replace_triggered_by", "precondition" and "postcondition"

diegoalejandropuertolopez
Автор

What if I restore the data disk from backup or snapshot.

How can I sync the state file as if I run a terraform plan it will show change or destroy

manavid