It's not possible to deploy the Cloud Service (classic) via terraform, So I have used Arm Template and Deploy Cloud Service (Classic). Following is the code.
resource "azurerm_resource_group_template_deployment" "classicCloudService" {
name = "testSyedClassic"
resource_group_name = var.resourceGroup
deployment_mode = "Incremental"
template_content = file("arm_template.json")
tags = local.resourceTags
}
Following is the ARM Template which I have used.
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"dnsName": {
"type": "string",
"defaultValue": "testClassicSyed"
},
"location": {
"type": "string",
"defaultValue": "westeurope"
}
},
"resources": [
{
"name": "[parameters('dnsName')]",
"apiVersion": "2015-06-01",
"location": "[parameters('location')]",
"type": "Microsoft.ClassicCompute/domainNames",
"properties": {}
}
],
"outputs": {}
}
As scaling options are missing in the ARM/TF Template. I want to scale like below, As this is only possible via Powershell. (As far as I know). But it's in old Azure Module.
CloudService
TaskWorkerRole: 1
WorkerRole1: 1
LongRunningTaskworkerRole: 1
DialogCloudService
TaskWorkerRole: 1
Webhook: 1
Set-AzureRole -ServiceName '<your_service_name>' -RoleName '<your_role_name>' -Slot <target_slot> -Count <desired_instances>
Can we use Set-AzRole or any other command to scale this? Or can we also do this via Terraform or Do we have any ARM Template for this?
