02/21/2019, 10:31 AM
I hit an interesting issue today. I was setting up routing tables and subnets and needed to associate each subnet to its appropriate routing table. The issue was having to create a unique name for each association, even though there was no reason to assign the association to a variable for later use. So what I wanted was something like a resource name of “{}-{}“.format(, but they are, of course, Outputs. The resource name has to be a string when the object is initialized, so can’t use Outputs. But the inidividual resource names for the route table and the subnet are already in place and aren’t (or maybe shouldn’t be) Outputs. Is there a way to expose runtime attributes of an object that aren’t dependent on resolution during processing, like the resource name?