Azure Classroomnotes 20/Oct/2022

JSON

  • Is data represenation language, used in data transport/representation between client and servers. It is also used for configuration purposes.
  • It is collection of name value pairs. There are three categories of data
    • simple/scalar
    • plural/list
    • dictionary/object

ARM Templates

  • While creating ARM Templates the JSON structure is defined by Azure
  • The template syntax/structure Refer Here
  • Structure
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "",
  "apiProfile": "",
  "parameters": {  },
  "variables": {  },
  "functions": [  ],
  "resources": [  ],
  "outputs": {  }
}
  • Minimal ARM template (only required values)
{
    "$schema": "",
    "contentVersion": "",
    "resources": []
}
{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "0.0.1",
    "resources": []
}
  • Refer Here for understanding resources.
  • Resource structure:
{
    "type": "",
    "apiVersion": "",
    "properties": {

    },
    "arguments": ""
}
  • To find out resource structure Refer Here
    Preview
  • Refer Here for arm template syntax for resource group.
  • Configure visual studio code: Refer Here
  • Install ARM Tools extension
    Preview

Hello-ARM Template (First template)

  • Create a new folder and open with vscode
  • Create a new file template.json with the following content
{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "0.0.1",
    "resources": []
}
  • Now lets try to add an virtual network. Refer Here
  • Refer Here for resource format
  • Refer Here
  • Refer Here for the template created.
  • Now create a resource group and click on create and select the template deployment
    Preview
    Preview
    Preview
    Preview
    Preview
    Preview
    Preview
    Preview
  • Now delete the resource group to clean up

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Network Widget by Acurax Small Business Website Designers

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube