i got it solved here https://discuss.hashicorp.com/t/using-flatten-on-a-nested-map-of-differing-value-types/11901/7