opentofu/internal/terraform/testdata/plan-required-whole-mod/main.tf
Martin Atkins 36d0a50427 Move terraform/ to internal/terraform/
This is part of a general effort to move all of Terraform's non-library
package surface under internal in order to reinforce that these are for
internal use within Terraform only.

If you were previously importing packages under this prefix into an
external codebase, you could pin to an earlier release tag as an interim
solution until you've make a plan to achieve the same functionality some
other way.
2021-05-17 14:09:07 -07:00

18 lines
492 B
HCL

resource "test_resource" "root" {
required = local.object.id
}
locals {
# This indirection is here to force the evaluator to produce the whole
# module object here rather than just fetching the single "object" output.
# This makes this fixture different than plan-required-output, which just
# accesses module.mod.object.id directly and thus visits a different
# codepath in the evaluator.
mod = module.mod
object = local.mod.object
}
module "mod" {
source = "./mod"
}