Below code should do the trick.
locals {
local = {
aks = {
type = "aks"
}
private_endpoints = {
type = "base"
}
}
subnet_feature1 = {
aks = {
cidr = [
"10.2.1.0/27",
]
}
private_endpoints = {
cidr = [
"10.2.1.64/26",
]
}
}
}
output "calc_map" {
value = {
for i in keys(local.local) : i => {
cidr = local.subnet_feature1[i].cidr,
type = local.local[i].type
}
}
}