ARM Template Generation for Azure Synapse - Bypassing GitHub API Size Limit Using Azure DevOps YAML Pipeline.
Problem - Publishing from Synapse Studio (linked to GitHub) fails to generate ARM templates due to: Error: { "message": "Sorry, your input was too large to process.", "status": 422 }
This happens when many artifacts (pipelines, datasets, dataflows) exceed GitHub REST API payload limits.
Solution - Bypass the GitHub API limitation by generating ARM templates in Azure DevOps using the Synapse workspace deployment@2
task with operation: validate
. This generates the templates directly from the repository and stores them as pipeline artifacts.
Steps to Implement the Working Solution:
Create a YAML Pipeline File in GitHub
Create myARMBuildScript.yml
in your GitHub repo:
trigger:
branches:
include:
- release # Synapse collaboration branch
pool:
vmImage: 'windows-latest'
steps:
- checkout: self
displayName: 'Checkout triggering branch'
clean: true
fetchDepth: 0
- task: Synapse workspace deployment@2
inputs:
operation: 'validate'
ArtifactsFolder: '$(System.DefaultWorkingDirectory)'
azureSubscription: '<Azure service connection name>'
ResourceGroupName: '<Resource group name>'
TargetWorkspaceName: '<Synapse workspace name (Dev)>'
Set Up a Build Pipeline in Azure DevOps
Go to Azure DevOps > Pipelines
Create a folder - Synapse-BuildPipeline
Inside it, create a pipeline (e.g., MyBuildPipeline
)
Choose GitHub as the source and point to your myARMBuildScript.yml
file
Save and run the pipeline
On success, the pipeline will generate:
-
template.json
-
template-parameters-definition.json
as published artifacts
Connect to Classic Release Pipeline
Go to your classic release pipeline - Add an Artifact with:
- Source type - Build
- Pipeline - The one created above
- Default version - Latest or as needed
- Source alias - e.g.,
synapse-arm
Use Templates in Deployment Stages
In subsequent stages:
- Add a Download Artifacts task to fetch the ARM templates
- Use a Synapse workspace deployment@2 task with
operation: deploy
- Point it to the downloaded template path from the previous step
This allows full reuse of validated ARM templates in your existing CI/CD release setup without needing to disconnect GitHub or manually export templates.
Key Benefits
- Fully bypasses GitHub REST API limits
- Keeps Git integration intact
- Automates template generation on PR merge
- Templates are reusable across environments via release pipelines
I hope this information helps. Please do let us know if you have any further queries.
If this answers your query, do click Accept Answer
and Yes
for was this answer helpful. And, if you have any further query do let us know.
Thank you.