I wonder if there is a way to get a resourceId with name that matches a regular expression in another subscription. The reason is that during deployment a random postfix is generated and appended to resource name, so resource name is not known beforehand. I know the resourceId() function could give you the resource Id if the resource name is known.
1 Answers
0
votes
You can achieve this by using the output of the previous template as input to the new template:
Azure ARM templates - using the output of other deployments
Here is how to achieve this in Azure DevOps:
resourceId()
, is the resource being deployed as part of the same template, or has it already been deployed beforehand as a completely separate deployment? – jarrad_obriennamesOfExistingResources
and populate it with the existing resources? e.g.namesOfExistingResources: ['myResource2834', 'myResource7482']
– jarrad_obrien