https://pulumi.com logo
Title
p

powerful-printer-57241

03/28/2023, 9:24 AM
Hi guys, how to you manage stack references? Since stack references are defined by just strings, not verifiable at compile time, it is easy to for example rename a stack output and not realize it breaks some other stacks. How do you deal with that?
b

billowy-army-68599

03/28/2023, 1:19 PM
generally you’d use the
require_output
methods and the downstream stack will fail at compile time
p

powerful-printer-57241

03/28/2023, 1:26 PM
You mean at runtime, no? The following code will not break at compile time:
var stackReference = new StackReference("nonexistent");
var output = stackReference.RequireOutput("doesntExist");
b

billowy-army-68599

03/28/2023, 1:27 PM
sorry yes, didn’t realise you were using dotnet 🙂