Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Azure by (13.1k points)
I have an ARM template through which I can able to select pricing tier, but it select only for VMs. It want to have a SQL servers and app services as well. Can anyone help me how can I able to add those services in my template?

1 Answer

0 votes
by (26.7k points)

You can try the following code. It is a very simple template.

{

"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",

"contentVersion": "1.0.0.0",

"parameters": {

    "pricing": {

        "type": "string",

        "allowedValues": [

            "Standard",

            "Free"

        ]

    }

},

"resources": [

    {

        "type": "Microsoft.Security/pricings",

        "apiVersion": "2017-08-01-preview",

        "name": "default",

        "properties": {

            "pricingTier": "[parameters('pricing')]"

        }

    },

    {

        "type": "Microsoft.Security/pricings",

        "apiVersion": "2018-06-01",

        "name": "SqlServers",

        "dependsOn": [

            "[concat('Microsoft.Security/pricings/default')]"

        ],

        "properties": {

            "pricingTier": "[parameters('pricing')]"

        }

    },

    {

        "type": "Microsoft.Security/pricings",

        "apiVersion": "2018-06-01",

        "name": "AppServices",

        "dependsOn": [

            "[concat('Microsoft.Security/pricings/SqlServers')]"

        ],

        "properties": {

            "pricingTier": "[parameters('pricing')]"

        }

    },

    {

        "type": "Microsoft.Security/pricings",

        "apiVersion": "2018-06-01",

        "name": "VirtualMachines",

        "dependsOn": [

            "[concat('Microsoft.Security/pricings/AppServices')]"

        ],

        "properties": {

            "pricingTier": "[parameters('pricing')]"

        }

    }

]

I hope this will help.

Want to become an Azure expert ? join azure architect certification now!

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...