I'm trying to deploy an ARM template with conditional logic to use two different key-vaults depending on the input. Each exists in a different subscription which is the issue..
(I'm using one template for prod and dev and deploying to different subscriptions accordingly)
Master template variable 1. Key vault 1: /subid1/xxxxx/keyvault 2. Key vualt 2: /subid2/xxxx/keyvault
Nested template "[If(x=y),/subid1/xxxxx/keyvault,/subid1/xxxxx/keyvault)]"
So when deploying into subscrition 2 (subid2) as an example the error is:
Code=KeyVaultParameterReferenceNotInTheSameTenant; Message=The specified KeyVault /subid1/xxxxx/keyvault is not in current tenant.
So I get why the error message is flagging(I've declared a variable in another sub), but how can i get the validation to check what's being deployed as opposed to the variables or is there another way to achieve the same goal?
Thanks,
more a workaround than an answer but I just declared key-vault as a parameter in input a different value into the VSTS build definition. Not ideal as I wanted selected DEV to flow through all the pertinent settings, but works so closing.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments