terraform/internal/stacks/stackruntime/testdata/mainbundle/test/invalid-local/invalid-local.tfcomponent.hcl
Matej Risek 768b7bd0bc Add local values walk to walk_dynamic
This helps us catch diagnostics in locals that only happen during evaluation

Co-authored-by: Mutahhir Hayat <mutahhir.hayat@hashicorp.com>
Co-authored-by: Matej Risek <matej.risek@hashicorp.com>
2025-12-11 10:42:52 +01:00

31 lines
544 B
HCL

required_providers {
testing = {
source = "hashicorp/testing"
version = "0.1.0"
}
}
provider "testing" "main" {}
variable "in" {
type = object({
name = string
})
}
locals {
# This is not caught during the config evaluation but only when we try to
# evaluate this value during planning / applying.
invalid_local = { for k, v in var.in : k => v + 3 }
}
component "self" {
source = "./"
inputs = {
name = "example#{local.invalid_local}"
}
providers = {
testing = provider.testing.main
}
}