Difference between revisions of "Terraform lifecycle meta-argument"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 
* https://www.terraform.io/language/meta-arguments/lifecycle
 
* https://www.terraform.io/language/meta-arguments/lifecycle
  
 +
<code>[[create_before_destroy]] | [[prevent_destroy]] | [[ignore_changes]] |  [[replace_triggered_by]]</code>
 +
 +
 +
== Options ==
 
* <code>create_before_destroy</code> changes default behavior so that the new replacement object is created first, and the prior object is destroyed after the replacement is created.
 
* <code>create_before_destroy</code> changes default behavior so that the new replacement object is created first, and the prior object is destroyed after the replacement is created.
 
* <code>[[prevent_destroy]]</code>
 
* <code>[[prevent_destroy]]</code>

Revision as of 14:02, 25 October 2022

create_before_destroy | prevent_destroy | ignore_changes |  replace_triggered_by


Options

Examples

resource "azurerm_resource_group" "example" {
  # ...

  lifecycle {
    create_before_destroy = true
  }
}


 lifecycle {
   ignore_changes = [
     latest_restorable_time
   ]
 }

Related

See also

Advertising: