none
how do you change linked services attributes via ARM templates

    Question

  • I would love to use ARM templates to deploy my data factory between environments, but I am having trouble with the deployment into test/prod.

    I have many linked services (file storage accounts, sql db, etc.) that need to have their attributes changed between environments, and I can only seem to dynamically change 'some' of the attributes.

    For example, for a 'FileServer" linked service, I am using an Azure File Share, and I need to change the HOST property upon deployment, however, the ADF UI doesnt allow me to enter a parameter into the HOST field, it just says that it's an invalid path and the save button is disabled.

    This is what I am looking to do:
    old:
    "host": "\\mystorage.file.core.windows.net\myfileshare"

    desried:
    "host": "parameters('storageaccounthostdirectorypath')]"

    Can anyone please help me figure this out?
    Mark

    Wednesday, June 27, 2018 12:29 AM

Answers

All replies

  • The feature of supporting linked service parameters is not ready yet. But it is in the plan.
    Friday, June 29, 2018 9:44 AM
  • You will need to modify the json files prior to import or deploy linked services in the portal. 
    You can transform the json using tools such as jq or Powershell.

    If you are using VSTS you may be able to use variable substitution.

    https://docs.microsoft.com/en-us/vsts/pipelines/tasks/transforms-variable-substitution?view=vsts

    cheers,

    Andrew


    Andrew Sears

    Friday, June 29, 2018 1:13 PM
  • Does the plan include parameterized Self-Hosted IR linked services? 

    Where the self hosted IR is a parameter and the connection string is a parameter.

    {
      "properties": {
        "type": "SqlServer",
        "typeProperties": {
          "connectionString": {
            "type": "SecureString",
            "value": "@pipeline().parameters.Connection"
          }
        },
        "connectVia": {
          "type": "integrationRuntimeReference",
          "referenceName": "@pipeline().parameters.IRName"
        }
      },
      "name": "MyLinkedService"
    }



    Thanx, Adam

    Tuesday, July 3, 2018 4:38 PM
  • Connection string is in the plan. But reference name can’t be parameters. Let me confirm and then update it here.
    Tuesday, July 3, 2018 5:14 PM
  • If not parameterizing the datasets to take a different linked service might would too.  Just need someone way to dynamically point to different datasources without deploying tons of datafactories.

    Thanx, Adam

    Thursday, July 5, 2018 5:30 PM