Forum Discussion
ARM template and how to test it partially
Hey,
that's definitely a problem I'd tackle at the root.
That means breaking the ARM template into several parts.
This simplifies troubleshooting the individual templates significantly.
Here's a good starting point: https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/linked-templates?tabs=azure-powershell
I also found this: Azure 4 Everyone by Adam Marczak
This https://azure4everyone.com/posts/2020/04/arm-nested-and-linked-templates/ and accompanying video tutorial cover the modularization of ARM templates.
By the way, have you set up the appropriate access policy on the Key Vault to ensure you have read permissions?
Here's an example of how you might manually test access to a Key Vault secret using PowerShell:
# Login to Azure
Connect-AzAccount
# Set the context to the subscription containing the Key Vault
Set-AzContext -SubscriptionId "your-subscription-id"
# Get the Key Vault secret
$secret = Get-AzKeyVaultSecret -VaultName "your-keyvault-name" -Name "your-secret-name"
# Output the secret value
$secret.SecretValueText
Feel free to reach out if you have any more questions ;)
Good luck and best regards.
Matthias