I have a json file which is having a map of environments.
“env” : {
"dev":{
"backendAppId" : "2a154e74-9ca3-40a5-b1fb-1233444",
"backendServiceUrl" :"https://url",
"roleName" :"Dev.Access"
},
"dit":{
"backendAppId" : "f00e20c7-0c1a-4913-a2123344",
"backendServiceUrl" :"https://url",
"roleName" :"Dit.Access"
}
Based on the env value , i need to fetch the right object from the map.
locals {
api_details = jsondecode(file(“api-source.json”))
env_info = [for env in local.api_details.env: env => “dev”]
}
How can i get the correct env object from the map? Appreciate your help on this