github.com/kevinklinger/open_terraform@v1.3.6/noninternal/checks/testdata/happypath/child/checks-happypath-child.tf (about)

     1  resource "null_resource" "b" {
     2    lifecycle {
     3      precondition {
     4        condition     = self.id == ""
     5        error_message = "Impossible."
     6      }
     7    }
     8  }
     9  
    10  resource "null_resource" "c" {
    11    count = 2
    12  
    13    lifecycle {
    14      postcondition {
    15        condition     = self.id == ""
    16        error_message = "Impossible."
    17      }
    18    }
    19  }
    20  
    21  output "b" {
    22    value = null_resource.b.id
    23  
    24    precondition {
    25      condition     = null_resource.b.id != ""
    26      error_message = "B has no id."
    27    }
    28  }
    29