Files
azure_tutorial/01_Beginner_JSON_templates/02_Add_resource
Tuan-Dat Tran b88d2a6806 initial commit
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2025-01-24 23:48:14 +01:00
..
2025-01-24 23:48:14 +01:00
2025-01-24 23:48:14 +01:00

Create resource

https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/template-tutorial-add-resource?tabs=azure-cli

Resource properties

  • name
  • type
  • apiVersion

Re-Create Resource Group

az group create --name tudattr_playground --location 'Germany West Central'

Result:

{
  "id": "/subscriptions/1b7ef43e-9f52-41ad-a21f-52b38fc9c292/resourceGroups/tudattr_playground",
  "location": "germanywestcentral",
  "managedBy": null,
  "name": "tudattr_playground",
  "properties": {
    "provisioningState": "Succeeded"
  },
  "tags": null,
  "type": "Microsoft.Resources/resourceGroups"
}

Create deployment

Storage account name must be between 3 and 24 characters in length and use numbers and lower-case letters only.

az deployment group create --name addstorage --resource-group tudattr_playground --template-file ./create_storage_account.json
{
  "id": "/subscriptions/1b7ef43e-9f52-41ad-a21f-52b38fc9c292/resourceGroups/tudattr_playground/providers/Microsoft.Resourc
es/deployments/addstorage",
  "location": null,
  "name": "addstorage",
  "properties": {
    "correlationId": "b6581c8c-3958-4ec5-9128-26a21e05ac38",
    "debugSetting": null,
    "dependencies": [],
    "duration": "PT2.155861S",
    "error": null,
    "mode": "Incremental",
    "onErrorDeployment": null,
    "outputResources": [
      {
        "id": "/subscriptions/1b7ef43e-9f52-41ad-a21f-52b38fc9c292/resourceGroups/tudattr_playground/providers/Microsoft.S
torage/storageAccounts/tudattrstorageaccount",
        "resourceGroup": "tudattr_playground"
      }
    ],
    "outputs": null,
    "parameters": null,
    "parametersLink": null,
    "providers": [
      {
        "id": null,
        "namespace": "Microsoft.Storage",
        "providerAuthorizationConsentState": null,
        "registrationPolicy": null,
        "registrationState": null,
        "resourceTypes": [
          {
            "aliases": null,
            "apiProfiles": null,
            "apiVersions": null,
            "capabilities": null,
            "defaultApiVersion": null,
            "locationMappings": null,
            "locations": [
              "germanywestcentral"
            ],
            "properties": null,
            "resourceType": "storageAccounts",
            "zoneMappings": null
          }
        ]
      }
    ],
    "provisioningState": "Succeeded",
    "templateHash": "13441018268045530495",
    "templateLink": null,
    "timestamp": "2025-01-24T22:31:48.986230+00:00",
    "validatedResources": null
  },
  "resourceGroup": "tudattr_playground",
  "tags": null,
  "type": "Microsoft.Resources/deployments"
}