github.com/hugorut/terraform@v1.1.3/src/terraform/testdata/apply-multi-depose-create-before-destroy/main.tf (about)

     1  variable "require_new" {
     2    type = string
     3  }
     4  
     5  resource "aws_instance" "web" {
     6      // require_new is a special attribute recognized by testDiffFn that forces
     7      // a new resource on every apply
     8      require_new = var.require_new
     9      lifecycle {
    10          create_before_destroy = true
    11      }
    12  }