initial commit

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
Tuan-Dat Tran
2025-01-24 23:48:14 +01:00
commit b88d2a6806
16 changed files with 2461 additions and 0 deletions

View File

@@ -0,0 +1,100 @@
# 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
```sh
az group create --name tudattr_playground --location 'Germany West Central'
```
Result:
```json
{
"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.
```sh
az deployment group create --name addstorage --resource-group tudattr_playground --template-file ./create_storage_account.json
```
```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"
}
```

View File

@@ -0,0 +1,19 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2021-09-01",
"name": "tudattrstorageaccount",
"location": "germanywestcentral",
"sku": {
"name": "Standard_LRS"
},
"kind": "StorageV2",
"properties": {
"supportsHttpsTrafficOnly": true
}
}
]
}