github.com/opentofu/opentofu@v1.7.1/internal/tofu/testdata/static-validate-refs/static-validate-refs.tf (about)

     1  terraform {
     2    required_providers {
     3      boop = {
     4        source = "foobar/beep" # intentional mismatch between local name and type
     5      }
     6    }
     7  }
     8  
     9  resource "aws_instance" "no_count" {
    10  }
    11  
    12  resource "aws_instance" "count" {
    13    count = 1
    14  }
    15  
    16  resource "boop_instance" "yep" {
    17  }
    18  
    19  resource "boop_whatever" "nope" {
    20  }
    21  
    22  data "beep" "boop" {
    23  }
    24  
    25  check "foo" {
    26    data "boop_data" "boop_nested" {}
    27  
    28    assert {
    29      condition     = data.boop_data.boop_nested.id == null
    30      error_message = "check failed"
    31    }
    32  }