https://pulumi.com logo
Title
b

brash-airline-37413

04/19/2021, 7:18 AM
Sorry I’ve looked everywhere but and can not seem to find the answer anywhere. How do I compare an
Output<string>
with a
string
?
b

better-shampoo-48884

04/19/2021, 7:24 AM
You can't directly.. but what you can do is possibly this:
myOutputString.apply(outputAsString => {
  if (outputAsString === "Potato") {
    // stuff you can do if Output<string> is a Potato
  }
})
the apply function allows you to perform operations on the value of the Output<string> once it becomes resolved - i.e. operate on it as a string. That can't happen outside that resolution function 🙂