Data factory CD pipeline: Deployment template validation failed - parameter not valid

Paul Hernandez 611 Reputation points Microsoft Employee
2023-01-24T09:45:11.01+00:00

Hi everyone,

I am trying to reuse one of my CI/CD pipelines for ADF and getting this annoying error in on CD stage:

##[error]Deployment template validation failed: 'The template parameters 'LS_KV_WEU_CI_CD_properties_typeProperties_baseUrl' in the parameters file are not valid; they are not present in the original template and can therefore not be provided at deployment time. The only supported parameters for this template are 'factoryName'.

This is quite weird, since the parameter does exist in the parameter file.

Here the code of the pipeline:

# Start of the CD to Dev environment
  - stage: Deploy_dev_Stage
    displayName: 'Publish ARM template'
    dependsOn: Build_Adf_Arm_Stage
    jobs:
      - deployment: Deploy_Dev
        displayName: 'Deployment - Dev'
        environment: DEV
        strategy:
          runOnce:
            deploy:
              steps:
                - task: DownloadPipelineArtifact@2
                  displayName: Download Build Artifacts - ADF ARM templates
                  inputs:
                    artifactName: $(CommonPublishArmTemplateName)
                - script: dir
                  displayName: List Files in Workspace
                  workingDirectory: '$(WorkspaceArmTemplateDirectory)'
                - task: AzureResourceManagerTemplateDeployment@3
                  displayName: 'Deploy to DEV'
                  inputs:
                    deploymentScope: 'Resource Group'
                    azureResourceManagerConnection: '$(DevDeployDevOpsConnection)'
                    subscriptionId: '$(DevSubscriptionId)'
                    action: 'Create Or Update Resource Group'
                    resourceGroupName: '$(DevAdfRgName)'
                    location: '$(DevAdfLocation)'
                    templateLocation: 'Linked artifact'
                    csmFile: '$(WorkspaceArmTemplateDirectory)/ARMTemplateForFactory.json'
                    csmParametersFile: '$(WorkspaceArmTemplateDirectory)/ARMTemplateParametersForFactory.json'
                    overrideParameters: '-factoryName "$(DevAdfName)" -LS_KV_WEU_CI_CD_properties_typeProperties_baseUrl "$(DevKeyVaultConnStr)"'
                    deploymentMode: 'Incremental'

And this is the parameters file:

{
	"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
	"contentVersion": "1.0.0.0",
	"parameters": {
		"factoryName": {
			"value": "Thomson-Reuters-ETL-DF"
		},
		"AzureSqlStaging01_connectionString": {
			"value": ""
		},
		"LS_ Azure_ Store_Front_Test_connectionString": {
			"value": "Integrated Security=False;Encrypt=True;Connection Timeout=30;Data Source=test-staging-central.database.windows.net;Initial Catalog=storefront-staging;User ID=scope_storefront"
		},
		"LS_Azure_SQL_DB_DWH_connectionString": {
			"value": "Integrated Security=False;Encrypt=True;Connection Timeout=30;Data Source=sqlsrv-weu-tst-dpl01.database.windows.net;Initial Catalog=SQLDB-WEU-TST-DWH01"
		},
		"LS_SQLServer_SW_Analysis_Test_connectionString": {
			"value": "Integrated Security=False;Data Source=WEUSCWSQLT001;Initial Catalog=Analysis;User ID=scopeworks"
		},
		"LS_SQLServer_SW_Publikationen_Test_connectionString": {
			"value": "Integrated Security=False;Data Source=WEUSCWSQLT001;Initial Catalog=Publikationen;User ID=scopeworks"
		},
		"LS_AzSqlDb_Golden_01_properties_typeProperties_connectionString_secretName": {
			"value": "etl-golden-connstr"
		},
		"LS_AzSqlDb_Staging_01_properties_typeProperties_connectionString_secretName": {
			"value": "etl-staging-connstr"
		},
		"LS_KV_WEU_CI_CD_properties_typeProperties_baseUrl": {
			"value": "https://ETL-ADF-key-vault.vault.azure.net/"
		},
		"Azure-SH-Scope-RT_properties_typeProperties_linkedInfo_resourceId": {
			"value": "/subscriptions/8c418068-9860-47b1-9bda-89060ec9cde5/resourcegroups/RG-WEU-TST02-ETL-DataFactory/providers/Microsoft.DataFactory/factories/ScopeWorks-ETL-DF/integrationruntimes/Azure-SH-Scope-RT"
		}
	}
}

As you can see, the parameter LS_KV_WEU_CI_CD_properties_typeProperties_baseUrl is available, but I am not able to overwrite it**.**

Any proposed solution will be highly appreciated.

BR.

Paul

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,048 questions
{count} votes

1 answer

Sort by: Most helpful
  1. BhargavaGunnam-MSFT 23,586 Reputation points Microsoft Employee
    2023-02-01T00:40:51.49+00:00

    Hello @Paul Hernandez,

    Welcome to the MS Q&A platform.

    Based on your error message, it looks like the parameter 'LS_KV_WEU_CI_CD_properties_typeProperties_baseUrl' is not defined on the ARMTemplateForFactory.json template file. Can you please verify this from your end?

    On the override template parameters section, is this the only parameter you have, or do you have any other parameters?

    Can you rename the pipeline parameters file and see if it works?

    User's image

    0 comments No comments