https://pulumi.com logo
w

white-balloon-205

09/25/2018, 12:44 AM
I'm a little surprised you need to test for
null
in that code - the callback should only run when the
networkConfiguration
is available. Were you seeing otherwise?
f

full-dress-10026

09/25/2018, 5:20 PM
Compilation fails with
TS2532: Object is possibly 'undefined'.
if I remove the
null
check.
strictNullChecks
is set to
true
.
w

white-balloon-205

09/25/2018, 5:40 PM
Ahh - I see - it's possible for this
networkConfiguration
to be missing from a valid ECS Service, so it can indeed be
undefined
. Nice that
strictNullChecks
catches this. You should be able to add back that check in a variant like what I shared as well if that looks simpler to you.
f

full-dress-10026

09/25/2018, 5:44 PM
Indeed it does. Thanks 🙂