github.com/opentofu/opentofu@v1.7.1/internal/tofu/testdata/apply-with-checks/main.tf (about)

     1  
     2  resource "aws_instance" "foo" {
     3    test_string = "Hello, world!"
     4  }
     5  
     6  resource "aws_instance" "baz" {
     7    test_string = aws_instance.foo.test_string
     8  }
     9  
    10  check "my_check" {
    11    data "aws_data_source" "bar" {
    12      id = "UI098L"
    13    }
    14  
    15    assert {
    16      condition = data.aws_data_source.bar.foo == "valid value"
    17      error_message = "invalid value"
    18    }
    19  
    20  }