Skip to content

Instantly share code, notes, and snippets.

@manekinekko
Created April 14, 2021 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manekinekko/50b6f39ff08428a8893e351cbddcebad to your computer and use it in GitHub Desktop.
Save manekinekko/50b6f39ff08428a8893e351cbddcebad to your computer and use it in GitHub Desktop.
Sample SWA deployment template
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"name": {
"type": "string"
},
"location": {
"type": "string"
},
"sku": {
"type": "string"
},
"repositoryUrl": {
"type": "string"
},
"branch": {
"type": "string"
},
"repositoryToken": {
"type": "securestring"
},
"appLocation": {
"type": "string"
},
"apiLocation": {
"type": "string"
},
"appArtifactLocation": {
"type": "string"
}
},
"resources": [
{
"apiVersion": "2019-12-01-preview",
"name": "[parameters('name')]",
"type": "Microsoft.Web/staticSites",
"location": "[parameters('location')]",
"properties": {
"repositoryUrl": "[parameters('repositoryUrl')]",
"branch": "[parameters('branch')]",
"repositoryToken": "[parameters('repositoryToken')]",
"buildProperties": {
"appLocation": "[parameters('appLocation')]",
"apiLocation": "[parameters('apiLocation')]",
"appArtifactLocation": "[parameters('appArtifactLocation')]"
}
},
"sku": {
"Tier": "[parameters('sku')]",
"Name": "[parameters('sku')]"
},
"resources":[
{
"apiVersion": "2019-12-01-preview",
"name": "appsettings",
"type": "config",
"location": "[parameters('location')]",
"properties": {
"testAppSetting": "hello_world"
},
"dependsOn": [
"[resourceId('Microsoft.Web/staticSites', parameters('name'))]"
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment