Forum Discussion

alwaysLearner's avatar
alwaysLearner
Iron Contributor
Jun 08, 2025

Parameterization of Linked Services

I am trying to parameterize Linked Service in ADF. Probably got confused, and hope someone will make it clear. 

Two questions:

  1. I have two parameters: 'url' and 'secretName'. However, in ARM template I only see 'url' parameter, but not 'secretName'. Why 'secretName' is not parameterized?
  2. How do I supply a value for the 'url' parameter when I will deploy ARM template to another environment (let's say 'Test' environment)?  

These are files:

Linked Service:

{
    "name": "LS_DynamicParam",
    "properties": {
        "parameters": {
            "SA_URL": {
                "type": "String",
                "defaultValue": "https://saforrisma.dfs.core.windows.net/"
            },
            "SecretName": {
                "type": "String",
                "defaultValue": "MySecretInKeyVault"
            }
        },
        "annotations": [],
        "type": "AzureBlobFS",
        "typeProperties": {
            "url": "@{linkedService().SA_URL}",
            "accountKey": {
                "type": "AzureKeyVaultSecret",
                "store": {
                    "referenceName": "LS_AKV",
                    "type": "LinkedServiceReference"
                },
                "secretName": {
                    "value": "@linkedService().SecretName",
                    "type": "Expression"
                }
            }
        }
    }
}

ARMTemplatePArametersForFactory.json

{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "factoryName": {
            "value": "ADF-Dev"
        },
        "LS_AKV_properties_typeProperties_baseUrl": {
            "value": "https://kv-forrisma.vault.azure.net/"
        },
        "LS_MAINStorage_properties_typeProperties_connectionString_secretName": {
            "value": "storageaccount-adf-dev"
        },
        "LS_DynamicParam_properties_typeProperties_url": {
            "value": "@{linkedService().SA_URL}"
        }
    }
}

 

No RepliesBe the first to reply

Resources