株式会社ヴァンデミックシステム

Blog

<スポンサーリンク>

テンプレートはMicrosoftのチュートリアルを参考に作成
https://docs.microsoft.com/ja-jp/azure/azure-resource-manager/resource-manager-quickstart-create-templates-use-the-portal

# 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>

ポータルで見るとこういう感じになるネ。
… }]

<スポンサーリンク>

コメントを残す

Allowed tags:  you may use these HTML tags and attributes: <a href="">, <strong>, <em>, <h1>, <h2>, <h3>
Please note:  all comments go through moderation.

*

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)