This message was deleted.
# general
s
This message was deleted.
s
How do you match the types up when you cannot have
Output<string>
as a property of a Map?
e
The value can't be an Output but the whole map can be so you can use apply to move the outputness up a level, something like:
Copy code
let out = <some output value>
let map = out.apply(value => { "key": value })
b
I've got an example of how to do this (specifically with a managed k8s cluster, but you can use it elsewhere): https://github.com/pulumi/pulumi-azure-native/issues/812#issuecomment-1009779637
s
@brave-planet-10645 thanks for that, worked like a charm
endedup wrapping it so I can use it for a deployment slot also:
Copy code
const getId = (id: string) => {
      const dict: {[key: string]: object} = {};
      dict[id] = {};
      return dict; 
}

let identity: any = {
   type: "userAssigned",
   userAssignedIdentities: args.userAssignedIdentity.id.apply(id => getId(id))
}