Github actions how to parameterize linked services

ChoudaryR-6454 120 Reputation points
2023-05-14T17:28:21.18+00:00

Can someone point me to any document on parameterizing the linked services using the GitHub actions?

I am following the document below, and I don't see any details.

https://learn.microsoft.com/en-us/azure/synapse-analytics/cicd/continuous-integration-delivery#set-up-a-release-in-github-actions

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,696 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bhargava-MSFT 29,266 Reputation points Microsoft Employee
    2023-05-17T20:20:03.8833333+00:00

    Hello Choudary R ,

    Welcome to the MS Q&A platform.

    To override the default parameter template, create a custom parameter template named template-parameters-definition.json in the root folder(master or main) of your Git branch. You must use this exact file name. When Azure Synapse/ADF publishes from the collaboration branch or the deployment task validates the artifacts in other branches, it reads this file and uses its configuration to generate the parameters. If Azure Synapse/ADF doesn't find that file, is uses the default parameter template.

    Example:

        {
        	"Microsoft.DataFactory/factories/linkedServices": {
        		"*": {
        			"properties": {
        				"typeProperties": {
        					"accountName": "=",
        					"username": "=",
        					"connectionString": "|:-connectionString:String",
        					"secretAccessKey": "|"
        				}
        			}
        		}
        	}
    

    In this example:
    The connectionString property is parameterized as a securestring value. It doesn't have a default value. The parameter name is shortened and suffixed with connectionString.

    Reference document: https://learn.microsoft.com/en-us/azure/synapse-analytics/cicd/continuous-integration-delivery#create-custom-parameters-in-the-workspace-template
    User's image

    User's image

    I hope this helps. Please let me know if you have any further questions.


1 additional answer

Sort by: Most helpful
  1. Sedat SALMAN 13,345 Reputation points
    2023-05-15T16:18:24.4666667+00:00

    this is your starting document

    https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/data-factory/parameterize-linked-services.md

    and

    https://learn.microsoft.com/en-us/azure/data-factory/parameterize-linked-services?tabs=data-factory

    and in the supported linked service types github not supported

    but maybe

    you can store your parameters as secrets in the GitHub repository

    Remember, secrets are encrypted and can only be used by GitHub Actions running in the same repository. They are not exposed in logs or available to users with read access.

    However, if you're specifically looking for a way to parameterize Azure Synapse Analytics linked services with GitHub Actions, you might need a custom solution or script that would apply parameters during the deployment process. This could involve using Azure CLI or PowerShell commands in your workflow to update linked services with parameters stored as GitHub secrets.