It is not necessary to use filemd5 function, for triggers block the problem reproduces using any function (i.e. file).
resource "null_resource" "test" {
triggers = {
trigger = filemd5("templates/123")
}
provisioner "file" {
content = "123"
destination = "/tmp/private_key"
}
}

If I comment trigger line it works properly:

It seems it's related to = symbol after trigger:

i am seeing the same behaviour, and i think it is related to the use of functions (and or functions in functions).

and

I think this is the same as #466, going to merge them together. We are currently investigating the syntax issues and plan to publish a hotfix once resolved.
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the context necessary to investigate further.
Most helpful comment
I think this is the same as #466, going to merge them together. We are currently investigating the syntax issues and plan to publish a hotfix once resolved.