I have a few templates that need to make use of shared resources - where some the instantiations of the templates need to lock on the same resource as each other and others need to lock on a different resource. Is it possible to set up a shared resource lock so that they lock on a shared resource with a variable (which will be set as a build parameter)?
For example, I have 4 templates. They all connect to a database - and I want to lock shared access to the database between those four builds. However, I can use the same 4 templates on a different project that connect to a different database...the current solution (since when I set a build to be dependent upon a lock as a build feature) is to go in to all 8 instantiations, and set up the first 4 with one shared resource (db1), and the second 4 with another shared resource (db2). I'd like to be able to lock based off of a variable called "databaseName" (since I'm already defining that in the instantiations of the templates).
Is such a thing possible? It doesn't appear to be, because selecting the resource to lock on is a dropdown - and I can't find a way to specify a variable name.