https://pulumi.com logo
Title
b

brash-quill-35776

11/11/2021, 3:28 PM
Hi, I asked this is Azure channel, but I think this is basically the usage of
Output
The error is in
azure-native
, which I can't change the source code, but the type is For type like 
*readonly* identity: pulumi.Output<outputs.web.ManagedServiceIdentityResponse | undefined>;
How do I put them into another 
Input
 type? I would get
Type 'Output<string | undefined>' is not assignable to type 'Input<string>'.
  Type 'OutputInstance<string | undefined>' is not assignable to type 'Input<string>'.
    Type 'OutputInstance<string | undefined>' is not assignable to type 'OutputInstance<string>'.
      Type 'string | undefined' is not assignable to type 'string'.
        Type 'undefined' is not assignable to type 'string'.ts(2322)
e

echoing-dinner-19531

11/11/2021, 4:09 PM
You need to handle the undefined case,
identity.apply((id : outputs.web.ManagedServiceIdentityResponse | undefined) => /* return a string here */)
. The most simple thing is you could just tell the compiler to ignore the undefined case and just return
id!
b

brash-quill-35776

11/11/2021, 4:14 PM
thank you sir