sparse-intern-71089
02/12/2023, 8:30 AMechoing-dinner-19531
02/13/2023, 11:51 AMid value in the result, and if it doesn't then it coming back as string | undefined is accurate and you should handle that (maybe by just casing to string if you know that in your case it does always get set).
If it always sets id then we should fix up the type for that.
If you just want to cast it you can do cachingOptimizedPolicy.id.apply(id => id!) to tell TS to ignore the undefined part.
Might be worth raising an issue at https://github.com/pulumi/pulumi-aws about this, the team that work on this will know better than me if id is actually optional or not.lively-controller-39972
02/13/2023, 12:14 PM.apply(id => id!) that seems a good workaround.