https://pulumi.com logo
#general
Title
# general
b

better-rainbow-14549

04/29/2019, 8:11 AM
is there a simpler way to rewrite this bit of typescript please?
Copy code
export const HostMappings = (
    apps: { [key: string]: kubernetesOutput.core.v1.Service }
) => pulumi.output(apps).apply(x => {
    let results: { [key: string]: pulumi.Output<string> } = {};
    for (let y in x) {
        let app = x[y];
        results[y] = pulumi.interpolate`http://${app.metadata.name}.${app.metadata.namespace}.svc.cluster.local`;
    }
    return pulumi.all(results)
});