prevent_destroy
unitoptional(bool, false)
Usage
The prevent_destroy attribute protects a unit’s resources from being destroyed. Use it for units such as a database or a unit that provides auth.
destroy, plan -destroy, and apply -destroy fail on a protected unit. run --all destroy skips the protected unit and the units it depends on, and destroys the rest. Destroying one of those dependencies on its own still works.
Examples
terraform { source = "git::git@github.com:foo/catalog.git//modules/db?ref=v0.0.3"}
prevent_destroy = true