// Running this configuration is expected to have an error since data sources are not allowed
// to use ephemeral values at all.
terraform {
  required_providers {
    simple = {
      source = "registry.opentofu.org/hashicorp/simple"
    }
  }
}

provider "simple" {
  alias = "s1"
}

module "test" {
  source = "./__mod-with-ephemeral-output"
  ephemeral_var = "value in ephemeral_var"
  regular_var = "value in regular_var"
}

data "simple_resource" "test_data1" {
  provider = simple.s1
  value    = module.test.ephemeral_out_from_regular_var
}