How to parameterize the values in ARM templates from Dev ADF while moving it to PROD ADF.

Vineeth Kalangi 40 Reputation points
2024-08-21T18:18:59.9133333+00:00

I have generated ARM template using CICD pipeline for Dev ADF. I'm trying to parametrize the values and deploy to Prod. I am unable to change the secretname under azure keyvault in prod linked service. Can someone help on this?

User's image

Whereas I'm able to change the values of the below from the parameter file:

User's image

Note : I'm using the ARMTemplateParametersForFactory.json file and created a prod parameter file. I'm unable to see Secret name in ARM template. I tried adding as per the documentation which didn't help:

https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/key-vault-parameter?tabs=azure-cliUser's image

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,253 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,548 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sina Salam 9,811 Reputation points
    2024-08-21T19:14:05.6733333+00:00

    Hello Vineeth Kalangi,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you are having issues to parameterize your linked services with Azure Data Factory (ADF) and secret name for Azure Key Vault.

    When creating a linked service in ADF that connects to an Azure Key Vault, you can specify the secret name, and this secret name will correspond to the secret you want to retrieve from the Key Vault. So, since you're able to change other values from the parameter file, but not the secret name you will have to do the followings in resolving this issue. In your ARM template, the secret name should be specified within the properties section of the linked service definition:

    {
            "type": "Microsoft.DataFactory/factories/linkedservices",
            "apiVersion": "2018-06-01",
            "name": "[concat(parameters('factoryName'), '/AzureKeyVaultLinkedService')]",
            "properties": {
                "type": "AzureKeyVault",
                "typeProperties": {
                    "baseUrl": "https://your-keyvault-name.vault.azure.net/",
                    "authenticationType": "ManagedServiceIdentity",
                    "secretName": "your-secret-name"  // Specify your actual secret name here
                }
            }
        }
    

    If you need more detailed about referencing secrets in ARM check this links: https://learn.microsoft.com/en-us/azure/data-factory/store-credentials-in-key-vault and https://www.youtube.com/watch?v=SmRbC23Ft9I

    Also, use the additional resources available by the right side of this page.

    Accept Answer

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.

    ** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful ** so that others in the community facing similar issues can easily find the solution.

    Best Regards,

    Sina Salam

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.