agreeable-angle-1483
02/20/2020, 2:31 PMStackReference
and print in the following example the other_output
variable, can anyone share an example?
other = StackReference("stg")
other_output = other.get_output("regions")
lemon-agent-27707
02/20/2020, 5:55 PMget_output
returns an output (think of it like a future). That output can be passed to other pulumi functions, but if you need to do string manipulation, or print the raw value, you'll have to use .apply
https://www.pulumi.com/docs/intro/concepts/programming-model/#applyagreeable-angle-1483
02/24/2020, 4:24 PMvpc_network:regions: {
"europe-west1": "10.2.0.0/16",
"europe-west3": "10.4.0.0/16",
"us-central1": "10.6.0.0/16",
"us-east1": "10.5.0.0/16"
}
in the beginning of the project run (pulumi up
) I want to verify there is no collision with any network in the other stacks.
I’m trying to create two lists: 1. long list of all the existing stacks networks
["10.2.0.0/16", "10.4.0.0/16", "10.6.0.0/16", "10.5.0.0/16", "10.11.0.0/16"]
2. list of current stack networks.
["10.1.0.0/16", "10.2.0.0/16"]
then check if there is collision between them.
• How do I get all stacks in the project?
• How do I get current stack variable?
• How do I compare between 2 lists of Pulumi objects?
Thanks a lotlemon-agent-27707
02/24/2020, 6:29 PMagreeable-angle-1483
02/25/2020, 1:22 PMlemon-agent-27707
02/27/2020, 5:31 PM.apply
, but you can always pass an output as an input to another resource.