Created
November 16, 2021 05:54
-
-
Save wuping2004/b96e0f9528472a768b3941bf52de47b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"cloudServiceName": { | |
"type": "string", | |
"metadata": { | |
"description": "Name of the cloud service" | |
} | |
}, | |
"location": { | |
"type": "string", | |
"metadata": { | |
"description": "Location of the cloud service" | |
} | |
}, | |
"deploymentLabel": { | |
"type": "string", | |
"metadata": { | |
"description": "Label of the deployment" | |
} | |
}, | |
"packageSasUri": { | |
"type": "securestring", | |
"metadata": { | |
"description": "SAS Uri of the CSPKG file to deploy" | |
} | |
}, | |
"configurationSasUri": { | |
"type": "securestring", | |
"metadata": { | |
"description": "SAS Uri of the service configuration (.cscfg)" | |
} | |
}, | |
"roles": { | |
"type": "array", | |
"metadata": { | |
"description": "Roles created in the cloud service application" | |
} | |
}, | |
"publicIPName": { | |
"type": "string", | |
"defaultValue": "contosocsIP", | |
"metadata": { | |
"description": "Name of public IP address" | |
} | |
}, | |
"upgradeMode": { | |
"type": "string", | |
"defaultValue": "Auto", | |
"metadata": { | |
"UpgradeMode": "UpgradeMode of the CloudService" | |
} | |
} | |
}, | |
"variables": { | |
"cloudServiceName": "[parameters('cloudServiceName')]", | |
"subscriptionID": "[subscription().subscriptionId]", | |
"lbName": "[concat(variables('cloudServiceName'), 'LB')]", | |
"lbFEName": "[concat(variables('cloudServiceName'), 'LBFE')]", | |
"resourcePrefix": "[concat('/subscriptions/', variables('subscriptionID'), '/resourceGroups/', resourceGroup().name, '/providers/')]" | |
}, | |
"resources": [ | |
{ | |
"apiVersion": "2020-10-01-preview", | |
"type": "Microsoft.Compute/cloudServices", | |
"name": "[variables('cloudServiceName')]", | |
"location": "[parameters('location')]", | |
"tags": { | |
"DeploymentLabel": "[parameters('deploymentLabel')]" | |
}, | |
"properties": { | |
"packageUrl": "[parameters('packageSasUri')]", | |
"configurationUrl": "[parameters('configurationSasUri')]", | |
"upgradeMode": "[parameters('upgradeMode')]", | |
"roleProfile": { | |
"roles": "[parameters('roles')]" | |
}, | |
"networkProfile": { | |
"loadBalancerConfigurations": [ | |
{ | |
"id": "[concat(variables('resourcePrefix'), 'Microsoft.Network/loadBalancers/', variables('lbName'))]", | |
"name": "[variables('lbName')]", | |
"properties": { | |
"frontendIPConfigurations": [ | |
{ | |
"name": "[variables('lbFEName')]", | |
"properties": { | |
"publicIPAddress": { | |
"id": "[concat(variables('resourcePrefix'), 'Microsoft.Network/publicIPAddresses/', parameters('publicIPName'))]" | |
} | |
} | |
} | |
] | |
} | |
} | |
] | |
}, | |
"osProfile": { | |
"secrets": [ | |
{ | |
"sourceVault": { | |
"id": "/subscriptions/5102f0a2-e80b-48c6-8d4b-2834a4473453/resourceGroups/CSES/providers/Microsoft.KeyVault/vaults/CSESKVault" | |
}, | |
"vaultCertificates": [ | |
{ | |
"certificateUrl": "https://cseskvault.vault.azure.net/secrets/csescert/f22eafd302b54a2a9a1fa3ca4e4ece16" | |
} | |
] | |
} | |
] | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment