Hi @Debbie Edwards You're running into issue with Synapse CI/CD deployment where Spark pool references aren’t properly parameterized in your ARM templates. The key error — "The document creation or update failed because of invalid reference 'sparkuskdev'"
— suggests that during deployment, the Spark pool name is still hardcoded rather than dynamically resolved via your environment-specific parameters.
Here are a few things to double-check:
- Parameter Definition in template-parameters-definition.json It’s crucial that you explicitly define a parameter for the Spark pool (e.g., bigDataPool) in this file. Without it, your deployment won’t know to expect a value for substitution.
- templateForWorkspace.json: Within this template, all references to the Spark pool should use a parameter reference lik
If referenceName is hardcoded to sparkdev, it won’t dynamically update during deployment. This is likely the root cause of the BadRequest you're seeing."bigDataPool": { "referenceName": "[parameters('bigDataPool')]", "type": "BigDataPoolReference" }
- TemplateParametersForWorkspace_{env}.json: These environment-specific parameter files should include entries like:
Make sure these are consistent and match the pool names for each environment."bigDataPool": { "value": "sparkuksdev" }
- YAML pipeline: It won’t auto-update values unless the pipeline explicitly passes parameters into the deployment template. Ensure you’re passing the right environment-specific parameters file using something like
parameters: - name: environment default: 'dev' ... - task: AzureResourceManagerTemplateDeployment@3 inputs: csmFile: 'templateForWorkspace.json' csmParametersFile: 'TemplateParametersForWorkspace_$(environment).json'
- Regenerate Synapse templates after changes: Any manual edits should be followed by re-exporting or regenerating your Synapse workspace templates to maintain integrity.
If you fix the parameterization in both the template and the parameters files and ensure your pipeline is wired up to pass those correctly, your deployment should succeed without hardcoded values.
I hope this information helps. Please do let us know if you have any further queries. Kindly consider upvoting the comment if the information provided is helpful. This can assist other community members in resolving similar issues.