github.com/swisspost/terratest@v0.0.0-20230214120104-7ec6de2e1ae0/test/fixtures/terraform-with-error/main.tf (about)

     1  resource "null_resource" "fail_on_first_run" {
     2    provisioner "local-exec" {
     3      command     = "if [[ -f terraform.tfstate.backup ]]; then echo 'This is not the first run, so exiting successfully' && exit 0; else echo 'This is the first run, exiting with an error' && exit 1; fi"
     4      interpreter = ["/bin/bash", "-c"]
     5    }
     6  }