I tried to use Fn.lookup to get by key from a map, but it is not working.
It’s probably related to the issue described here lookup fails on a JSON input · Issue #16154 · hashicorp/terraform · GitHub
I have limited knowledge about the type system of Terraform, but to me it looks like jsondecode returns a map.
I don’t know how to translate the square brackets notation to Java.