terraform/testing/equivalence-tests/tests/data_read/main.tf
Liam Cervante 82b5cfad7e
Add more equivalence tests that are testing edge cases around the new structured renderer (#32538)
* add test cases

* run equivalence tests

* delete old outputs

* drift_relevant_attributes should ignore the number attribute

* also add a test for data reads

* test destroy only
2023-01-20 09:31:11 +01:00

39 lines
644 B
HCL

terraform {
required_providers {
tfcoremock = {
source = "hashicorp/tfcoremock"
version = "0.1.1"
}
local = {
source = "hashicorp/local"
version = "2.2.3"
}
random = {
source = "hashicorp/random"
version = "3.4.3"
}
}
}
provider "tfcoremock" {}
provider "local" {}
provider "random" {}
module "create" {
source = "./create"
contents = "hello, world!"
}
data "tfcoremock_simple_resource" "read" {
id = module.create.id
depends_on = [
module.create
]
}
resource "tfcoremock_simple_resource" "create" {
string = data.tfcoremock_simple_resource.read.string
}