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.No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by