テンプレートはMicrosoftのチュートリアルを参考に作成
https://docs.microsoft.com/ja-jp/azure/azure-resource-manager/resource-manager-quickstart-create-templates-use-the-portal
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# AzureResourceManagerへログイン PS C:\Users\yuta> Connect-AzureRmAccount Account SubscriptionName TenantId Environment ------- ---------------- -------- ----------- carlo_stage5@outlook.com 従量課金 982af0a1-e825-4fc6-bce7-eab626e2aa63 AzureCloud # NewAzureRmResourceGroupDeploymentでデプロイ # -TemplateFileでテンプレートを指定、-TemplateParameterFileでパラメータファイルを指定 PS C:\Users\yuta\Downloads\template> New-AzureRmResourceGroupDeployment -ResourceGroupName cloud-shell-storage-westus - TemplateFile .\template.json -TemplateParameterFile .\parameters.json DeploymentName : template ResourceGroupName : cloud-shell-storage-westus ProvisioningState : Succeeded Timestamp : 2019/01/12 7:35:48 Mode : Incremental TemplateLink : Parameters : Name Type Value =============== ========================= ========== location String japaneast storageAccountName String test0910aaa accountType String Standard_RAGRS kind String StorageV2 accessTier String Hot supportsHttpsTrafficOnly Bool True Outputs : DeploymentDebugLogLevel : # parameters.jsonには「storageAccountName String test0910aaa」を指定しているので、その名前のリソースオブジェクトが作成されている PS C:\Users\yuta\Downloads\template> Get-AzureRmResource -ResourceGroupName cloud-shell-storage-westus Name : company ResourceGroupName : cloud-shell-storage-westus ResourceType : Microsoft.Network/virtualNetworks Location : westus ResourceId : /subscriptions/4431543b-d4b1-4dc7-b776-520970458fca/resourceGroups/cloud-shell-storage-westus/provi ders/Microsoft.Network/virtualNetworks/company Name : test0910aaa ResourceGroupName : cloud-shell-storage-westus ResourceType : Microsoft.Storage/storageAccounts Location : japaneast ResourceId : /subscriptions/4431543b-d4b1-4dc7-b776-520970458fca/resourceGroups/cloud-shell-storage-westus/provi ders/Microsoft.Storage/storageAccounts/test0910aaa PS C:\Users\yuta\Downloads\template> |
ポータルで見るとこういう感じになるネ。
… }]