locals {
name = kubernetes_namespace.my_conditional_namespaces.metadata.0.name
}
Expected behavior
$ tfupdate terraform tmp/test.tf
Should parse with no errors
Actual behavior
Panic
$ tfupdate terraform tmp/test.tf
failed to parse input: tmp/test.tf
panic: didn't find any token of type TokenOBrack
This may be caused by a bug in the hclwrite parser.
As a workaround, you can ignore this file with --ignore-path option
Version
Configuration
$ cat tmp/test.tf
Expected behavior
Should parse with no errors
Actual behavior
Panic
Debug log
Related issue
https://github.com/minamijoyo/tfupdate/issues/4#issuecomment-638284704 https://github.com/hashicorp/hcl/issues/327 https://github.com/hashicorp/hcl/pull/369
This issue seems to be fixed in upstream hcl@v2.5.1