Hey, Wondered if anyone new a way to actually capt...
# typescript
b
Hey, Wondered if anyone new a way to actually capture errors from pulumi
Copy code
try{
      NatGw = aws.ec2.getNatGateway({
        tags: {
          Name: "RCS-CDR"
        }
      });
    } catch(err){
      // Craete a New NAT GW here ... 
    }
The error is not caught but it's thrown in my terminal after pulumi up. I'd like to catch the error and create a new resource if the gatway with the name
RCS-CDR
does not exist
b
I've never really used the Pulumi read methods, but don't they just return a
Promise
?