Archives for Quick Recipes Terraform
Resource Shutdown via terraform
Terraform is often used to destroy environments - which keeps the state file consistent, when the next create event needs to occur. However, sometimes, instead of destroying resources, all you…
Manual Drift and terraform
Also read - Preventing accidental deletion of resources Prevent_Destroy in Terraform Terraform has a few options for detecting and managing drift of resources. lifecycle { prevent_destroy = true } However,…
Custom script from within a terraform module
What if you wanted to execute a python script or a bash / powershell script from within your terraform module? Note that this is a different use case from that…
Multiple Identical Resources via Terraform
There isn't really a looping construct, but there's still a way to perform a type of a loop in terraform. Btw - as a quick aside, the difference between a…