Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.21k stars 3.82k forks source link

[NetCore 0.13.1] AzureRM.NetCore\[New|Get]-AzureRmResourceGroupDeployment returns parameter as Json objects/arrays #7410

Open ignatz42 opened 5 years ago

ignatz42 commented 5 years ago

Description

The AzureRM functions New-AzureRmResourceGroupDeployment and Get-AzureRmResourceGroupDeployment return an object that contains a hashtable of parameters used at deployment time. When the parameter is of type Object or Array, the value in the hashtable doesn't match what was provided.

Script/Steps for Reproduction

# 1. Download the test
$complexTemplateURL = "https://github.com/Azure/azure-powershell/raw/master/src/ResourceManager/Resources/Commands.Resources.Test/complexParametersTemplate.json"
$response = Invoke-WebRequest -Uri $complexTemplateURL
if ($response.StatusCode -ne "200") {throw "Download Failed"}
$response.Content | Out-File "complexParametersTemplate.json" -Force

# 2. Create a Resource Group
$resourceGroupName = "deploymentTest-rg"
$location = "East US"
$rg = New-AzureRmResourceGroup -Name $resourceGroupName -Location $location
if ($null -eq $rg) {throw "Sort the problem with the resource group"}

# 3. Deploy a the test template
$templateParameters = @{
    appSku      = @{
        code = "f1"
        name = "Free"
    }
    servicePlan = "PlanBOSpace"
    ranks       = @("a", "b")
}
$deployment = New-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateParameterObject $templateParameters -TemplateFile "complexParametersTemplate.json" -Confirm:$false -Force

# 4. Verify that the output parameters match the input.
# The deployment variable here is the same as above.
$workaround = $false
$deployment = Get-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName
foreach ($parameter in $deployment.Parameters.Keys) {
    $deploymentParameterValue = $deployment.Parameters.$parameter.Value
    # This workaround requires PowerShell Core 6.1
    if (($workaround) -and ($deployment.Parameters.$parameter.Type -eq "Object")) {
        Write-Verbose "Comparing an object."
        $deploymentParameterValue = ($deployment.Parameters.$parameter.Value.ToString() | ConvertFrom-Json -AsHashtable)
    }
    # This workaround works with PowerShell 5.1
    if (($workaround) -and ($deployment.Parameters.$parameter.Type -eq "Array")) {
        Write-Verbose "Comparing an array."
        $deploymentParameterValue = ($deployment.Parameters.$parameter.Value.ToString() | ConvertFrom-Json)
    }
    $objectComparisonResult = Compare-Object -ReferenceObject $templateParameters.$parameter -DifferenceObject $deploymentParameterValue
    if ($null -eq $objectComparisonResult) {
        Write-Host ("Matched: {0} {1} {2}" -f $parameter, $deployment.Parameters.$parameter.Type, $deployment.Parameters.$parameter.Value)
    } else {
        Write-Host "Failed!!"
        $objectComparisonResult
    }
}

Module Version

Get-Module -ListAvailable

    Directory: C:\Program Files\PowerShell\Modules

ModuleType Version    Name                                PSEdition ExportedCommands
---------- -------    ----                                --------- ----------------
Script     0.13.1     Azure.AnalysisServices.Netcore      Core      {Add-AzureAnalysisServicesAccount, Restart-Azure...
Script     0.13.1     Azure.Storage.Netcore               Core      {Get-AzureStorageTable, New-AzureStorageTableSAS...
Script     0.13.1     AzureRM.Aks.Netcore                 Core      {Get-AzureRmAks, New-AzureRmAks, Remove-AzureRmA...
Script     0.13.1     AzureRM.AnalysisServices.Netcore    Core      {Resume-AzureRmAnalysisServicesServer, Suspend-A...
Script     0.13.1     AzureRM.ApiManagement.Netcore       Core      {Add-AzureRmApiManagementRegion, Get-AzureRmApiM...
Script     0.13.1     AzureRM.ApplicationInsights.Netcore Core      {Get-AzureRmApplicationInsights, New-AzureRmAppl...
Script     0.13.1     AzureRM.Automation.Netcore          Core      {Get-AzureRMAutomationHybridWorkerGroup, Get-Azu...
Script     0.13.1     AzureRM.Batch.Netcore               Core      {Remove-AzureRmBatchAccount, Get-AzureRmBatchAcc...
Script     0.13.1     AzureRM.Billing.Netcore             Core      {Get-AzureRmBillingInvoice, Get-AzureRmBillingPe...
Script     0.13.1     AzureRM.Cdn.Netcore                 Core      {Get-AzureRmCdnProfile, Get-AzureRmCdnProfileSso...
Script     0.13.1     AzureRM.CognitiveServices.Netcore   Core      {Get-AzureRmCognitiveServicesAccount, Get-AzureR...
Script     0.13.1     AzureRM.Compute.Netcore             Core      {Remove-AzureRmAvailabilitySet, Get-AzureRmAvail...
Script     0.13.1     AzureRM.Consumption.Netcore         Core      {Get-AzureRmConsumptionBudget, Get-AzureRmConsum...
Script     0.13.1     AzureRM.ContainerInstance.Netcore   Core      {New-AzureRmContainerGroup, Get-AzureRmContainer...
Script     0.13.1     AzureRM.ContainerRegistry.Netcore   Core      {New-AzureRmContainerRegistry, Get-AzureRmContai...
Script     0.13.1     AzureRM.DataLakeAnalytics.Netcore   Core      {Get-AzureRmDataLakeAnalyticsDataSource, New-Azu...
Script     0.13.1     AzureRM.DataLakeStore.Netcore       Core      {Get-AzureRmDataLakeStoreTrustedIdProvider, Remo...
Script     0.13.1     AzureRM.DevTestLabs.Netcore         Core      {Get-AzureRmDtlAllowedVMSizesPolicy, Get-AzureRm...
Script     0.13.1     AzureRM.Dns.Netcore                 Core      {Get-AzureRmDnsRecordSet, New-AzureRmDnsRecordCo...
Script     0.13.1     AzureRM.EventGrid.Netcore           Core      {New-AzureRmEventGridTopic, Get-AzureRmEventGrid...
Script     0.13.1     AzureRM.EventHub.Netcore            Core      {New-AzureRmEventHubNamespace, Get-AzureRmEventH...
Script     0.13.1     AzureRM.Insights.Netcore            Core      {Get-AzureRmMetricDefinition, Get-AzureRmMetric,...
Script     0.13.1     AzureRM.IotHub.Netcore              Core      {Add-AzureRmIotHubKey, Get-AzureRmIotHubEventHub...
Script     0.13.1     AzureRM.KeyVault.Netcore            Core      {Add-AzureKeyVaultCertificate, Update-AzureKeyVa...
Script     0.13.1     AzureRM.LogicApp.Netcore            Core      {Get-AzureRmIntegrationAccountAgreement, Get-Azu...
Script     0.13.1     AzureRM.MachineLearning.Netcore     Core      {Move-AzureRmMlCommitmentAssociation, Get-AzureR...
Script     0.13.1     AzureRM.MachineLearningCompute.N... Core      {Get-AzureRmMlOpCluster, Get-AzureRmMlOpClusterK...
Script     0.13.1     AzureRM.MarketplaceOrdering.Netcore Core      {Get-AzureRmMarketplaceTerms, Set-AzureRmMarketp...
Script     0.13.1     AzureRM.Media.Netcore               Core      {Sync-AzureRmMediaServiceStorageKeys, Set-AzureR...
Script     0.13.1     AzureRM.Netcore                     Core
Script     0.13.1     AzureRM.Network.Netcore             Core      {Add-AzureRmApplicationGatewayAuthenticationCert...
Script     0.13.1     AzureRM.NotificationHubs.Netcore    Core      {Get-AzureRmNotificationHub, Get-AzureRmNotifica...
Script     0.13.1     AzureRM.OperationalInsights.Netcore Core      {New-AzureRmOperationalInsightsAzureActivityLogD...
Script     0.13.1     AzureRM.PolicyInsights.Netcore      Core      {Get-AzureRmPolicyEvent, Get-AzureRmPolicyState,...
Script     0.13.1     AzureRM.PowerBIEmbedded.Netcore     Core      {Remove-AzureRmPowerBIWorkspaceCollection, Get-A...
Script     0.13.1     AzureRM.Profile.Netcore             Core      {Disable-AzureRmDataCollection, Disable-AzureRmC...
Script     0.13.1     AzureRM.Relay.Netcore               Core      {New-AzureRmRelayNamespace, Get-AzureRmRelayName...
Script     0.13.1     AzureRM.Resources.Netcore           Core      {Get-AzureRmProviderOperation, Remove-AzureRmRol...
Script     0.13.1     AzureRM.ServiceBus.Netcore          Core      {New-AzureRmServiceBusNamespace, Get-AzureRmServ...
Script     0.13.1     AzureRM.ServiceFabric.Netcore       Core      {Add-AzureRmServiceFabricApplicationCertificate,...
Script     0.13.1     AzureRM.Sql.Netcore                 Core      {Get-AzureRmSqlDatabaseTransparentDataEncryption...
Script     0.13.1     AzureRM.Storage.Netcore             Core      {Get-AzureRmStorageAccount, Get-AzureRmStorageAc...
Script     0.13.1     AzureRM.StreamAnalytics.Netcore     Core      {Get-AzureRmStreamAnalyticsFunction, Get-AzureRm...
Script     0.13.1     AzureRM.Tags.Netcore                Core      {Remove-AzureRmTag, Get-AzureRmTag, New-AzureRmTag}
Script     0.13.1     AzureRM.TrafficManager.Netcore      Core      {Disable-AzureRmTrafficManagerEndpoint, Enable-A...
Script     0.13.1     AzureRM.UsageAggregates.Netcore     Core      Get-UsageAggregates
Script     0.13.1     AzureRM.Websites.Netcore            Core      {Get-AzureRmAppServicePlan, Set-AzureRmAppServic...
Script     5.4.1      InvokeBuild                         Desk      {Invoke-Build, Build-Checkpoint, Build-Parallel}
Script     4.4.0      Pester                              Desk      {Describe, Context, It, Should...}
Script     4.7.1      psake                               Desk      {Invoke-psake, Invoke-Task, Get-PSakeScriptTasks...
Script     0.2.26     PSCodeHealth                        Desk      {Invoke-PSCodeHealth, Get-PSCodeHealthCompliance...
Script     1.17.1     PSScriptAnalyzer                    Desk      {Get-ScriptAnalyzerRule, Invoke-ScriptAnalyzer, ...

    Directory: C:\program files\powershell\6\Modules

ModuleType Version    Name                                PSEdition ExportedCommands
---------- -------    ----                                --------- ----------------
Manifest   6.1.0.0    CimCmdlets                          Core      {Get-CimAssociatedInstance, Get-CimClass, Get-Ci...
Manifest   1.1.0.0    Microsoft.PowerShell.Archive        Desk      {Compress-Archive, Expand-Archive}
Manifest   6.1.0.0    Microsoft.PowerShell.Diagnostics    Core      {Get-WinEvent, New-WinEvent}
Manifest   6.1.0.0    Microsoft.PowerShell.Host           Core      {Start-Transcript, Stop-Transcript}
Manifest   6.1.0.0    Microsoft.PowerShell.Management     Core      {Add-Content, Clear-Content, Clear-ItemProperty,...
Manifest   6.1.0.0    Microsoft.PowerShell.Security       Core      {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Crede...
Manifest   6.1.0.0    Microsoft.PowerShell.Utility        Core      {Format-List, Format-Custom, Format-Table, Forma...
Manifest   6.1.0.0    Microsoft.WSMan.Management          Core      {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-...
Script     1.1.7.2    PackageManagement                   Desk      {Find-Package, Get-Package, Get-PackageProvider,...
Script     1.6.7      PowerShellGet                       Desk      {Find-Command, Find-DSCResource, Find-Module, Fi...
Script     0.0        PSDesiredStateConfiguration         Desk      {GetImplementingModulePath, GetPatterns, Set-Nod...
Script     6.1.0.0    PSDiagnostics                       Core      {Disable-PSTrace, Disable-PSWSManCombinedTrace, ...
Script     2.0.0      PSReadLine                          Desk      {Get-PSReadLineKeyHandler, Set-PSReadLineKeyHand...
Binary     1.1.2      ThreadJob                           Desk      Start-ThreadJob

Environment Data

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.1.0
PSEdition                      Core
GitCommitId                    6.1.0
OS                             Microsoft Windows 10.0.17134
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Debug Output

PS C:\src\github> $DebugPreference='Continue'
PS C:\src\github>
PS C:\src\github> # 1. Download the test
PS C:\src\github> $complexTemplateURL = "https://github.com/Azure/azure-powershell/raw/master/src/ResourceManager/Resources/Commands.Resources.Test/complexParametersTemplate.json"
PS C:\src\github> $response = Invoke-WebRequest -Uri $complexTemplateURL
PS C:\src\github> if ($response.StatusCode -ne "200") {throw "Download Failed"}
PS C:\src\github> $response.Content | Out-File "complexParametersTemplate.json" -Force
PS C:\src\github>
PS C:\src\github> # 2. Create a Resource Group
PS C:\src\github> $resourceGroupName = "deploymentTest-rg"
PS C:\src\github> $location = "East US"
PS C:\src\github> $rg = New-AzureRmResourceGroup -Name $resourceGroupName -Location $location
DEBUG: 1:14:32 PM - NewAzureResourceGroupCmdlet begin processing with ParameterSet '__AllParameterSets'.
DEBUG: 1:14:32 PM - using account id 'user@domain.com'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'user@domain.com', environment: 'AzureCloud', tenant: 'd6f493b6-8cac-4ce3-ad45-59648959894e'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
HEAD

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg?api-version=2017-05-10

Headers:
x-ms-client-request-id        : ecfcc5d2-abda-4fe3-bf14-2274eb77d556
Accept-Language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
NotFound

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-failure-cause            : gateway
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-request-id               : 6637953a-31af-47fd-b74d-bf089127958c
x-ms-correlation-request-id   : 6637953a-31af-47fd-b74d-bf089127958c
x-ms-routing-request-id       : NORTHCENTRALUS:20180927T181433Z:6637953a-31af-47fd-b74d-bf089127958c
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Thu, 27 Sep 2018 18:14:32 GMT

Body:

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PUT

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg?api-version=2017-05-10

Headers:
x-ms-client-request-id        : 84e2f644-a4d1-4e79-86cc-61a40e817071
Accept-Language               : en-US

Body:
{
  "location": "East US"
}

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
Created

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-writes: 1199
x-ms-request-id               : 58fb2124-418c-437d-986d-0505f40bf717
x-ms-correlation-request-id   : 58fb2124-418c-437d-986d-0505f40bf717
x-ms-routing-request-id       : NORTHCENTRALUS:20180927T181434Z:58fb2124-418c-437d-986d-0505f40bf717
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Thu, 27 Sep 2018 18:14:34 GMT

Body:
{
  "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg",
  "name": "deploymentTest-rg",
  "location": "eastus",
  "properties": {
    "provisioningState": "Succeeded"
  }
}

DEBUG: AzureQoSEvent: CommandName - New-AzureRmResourceGroup; IsSuccess - True; Duration - 00:00:01.1194746; Exception - ;
DEBUG: Finish sending metric.
DEBUG: 1:14:34 PM - NewAzureResourceGroupCmdlet end processing.
DEBUG: 1:14:34 PM - NewAzureResourceGroupCmdlet end processing.
PS C:\src\github> if ($null -eq $rg) {throw "Sort the problem with the resource group"}
PS C:\src\github>
PS C:\src\github> # 3. Deploy a the test template
PS C:\src\github> $templateParameters = @{
>>     appSku      = @{
>>         code = "f1"
>>         name = "Free"
>>     }
>>     servicePlan = "PlanBOSpace"
>>     ranks       = @("a", "b")
>> }
PS C:\src\github> $deployment = New-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateParameterObject $templateParameters -TemplateFile "complexParametersTemplate.json" -Confirm:$false -Force
DEBUG: 1:14:34 PM - NewAzureResourceGroupDeploymentCmdlet begin processing with ParameterSet 'ByTemplateFileAndParameterObject'.
DEBUG: 1:14:34 PM - using account id 'user@domain.com'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'user@domain.com', environment: 'AzureCloud', tenant: 'd6f493b6-8cac-4ce3-ad45-59648959894e'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
POST

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate/validate?api-version=2017-05-10

Headers:
x-ms-client-request-id        : f11866e0-47b1-4843-b9dc-837b14c9adbc
Accept-Language               : en-US

Body:
{
  "properties": {
    "template": {
      "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
      "contentVersion": "1.0.0.0",
      "parameters": {
        "appSku": {
          "type": "object",
          "allowedValues": [
            {
              "code": "f1",
              "name": "Free"
            },
            {
              "code": "f2",
              "name": "Shared"
            },
            {
              "code": "f3",
              "name": {
                "major": "Official",
                "minor": "1.0"
              }
            }
          ],
          "defaultValue": {
            "code": "f1",
            "name": "Free"
          }
        },
        "servicePlan": {
          "type": "string"
        },
        "ranks": {
          "type": "array",
          "allowedValues": [
            [
              "a",
              "b"
            ],
            [
              "c",
              "d"
            ],
            [
              "d",
              "e",
              "f"
            ]
          ],
          "defaultValue": [
            "a",
            "b"
          ]
        }
      },
      "variables": {},
      "resources": [
        {
          "type": "Microsoft.Storage/storageAccounts",
          "name": "[concat('tianotest010', parameters('appSku').code, parameters('ranks')[0])]",
          "apiVersion": "2015-06-15",
          "location": "[resourceGroup().location]",
          "properties": {
            "accountType": "Standard_LRS"
          }
        }
      ],
      "outputs": {}
    },
    "parameters": {
      "appSku": {
        "value": {
          "code": "f1",
          "name": "Free"
        }
      },
      "servicePlan": {
        "value": "PlanBOSpace"
      },
      "ranks": {
        "value": [
          "a",
          "b"
        ]
      }
    },
    "mode": "Incremental"
  }
}

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-writes: 1199
x-ms-request-id               : 77b3ec30-64cc-4f79-add2-a7e2c74613c1
x-ms-correlation-request-id   : 77b3ec30-64cc-4f79-add2-a7e2c74613c1
x-ms-routing-request-id       : NORTHCENTRALUS:20180927T181436Z:77b3ec30-64cc-4f79-add2-a7e2c74613c1
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Thu, 27 Sep 2018 18:14:36 GMT

Body:
{
  "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate",
  "name": "complexParametersTemplate",
  "properties": {
    "templateHash": "6287512875150736918",
    "parameters": {
      "appSku": {
        "type": "Object",
        "value": {
          "code": "f1",
          "name": "Free"
        }
      },
      "servicePlan": {
        "type": "String",
        "value": "PlanBOSpace"
      },
      "ranks": {
        "type": "Array",
        "value": [
          "a",
          "b"
        ]
      }
    },
    "mode": "Incremental",
    "provisioningState": "Succeeded",
    "timestamp": "2018-09-27T18:14:36.4520202Z",
    "duration": "PT0S",
    "correlationId": "77b3ec30-64cc-4f79-add2-a7e2c74613c1",
    "providers": [
      {
        "namespace": "Microsoft.Storage",
        "resourceTypes": [
          {
            "resourceType": "storageAccounts",
            "locations": [
              "eastus"
            ]
          }
        ]
      }
    ],
    "dependencies": [],
    "validatedResources": [
      {
        "apiVersion": "2015-06-15",
        "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Storage/storageAccounts/tianotest010f1a",
        "name": "tianotest010f1a",
        "type": "Microsoft.Storage/storageAccounts",
        "location": "eastus",
        "properties": {
          "accountType": "Standard_LRS"
        }
      }
    ]
  }
}

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PUT

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate?api-version=2017-05-10

Headers:
x-ms-client-request-id        : ee9f50e7-cea3-48fd-98d8-e78379fc3039
Accept-Language               : en-US

Body:
{
  "properties": {
    "template": {
      "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
      "contentVersion": "1.0.0.0",
      "parameters": {
        "appSku": {
          "type": "object",
          "allowedValues": [
            {
              "code": "f1",
              "name": "Free"
            },
            {
              "code": "f2",
              "name": "Shared"
            },
            {
              "code": "f3",
              "name": {
                "major": "Official",
                "minor": "1.0"
              }
            }
          ],
          "defaultValue": {
            "code": "f1",
            "name": "Free"
          }
        },
        "servicePlan": {
          "type": "string"
        },
        "ranks": {
          "type": "array",
          "allowedValues": [
            [
              "a",
              "b"
            ],
            [
              "c",
              "d"
            ],
            [
              "d",
              "e",
              "f"
            ]
          ],
          "defaultValue": [
            "a",
            "b"
          ]
        }
      },
      "variables": {},
      "resources": [
        {
          "type": "Microsoft.Storage/storageAccounts",
          "name": "[concat('tianotest010', parameters('appSku').code, parameters('ranks')[0])]",
          "apiVersion": "2015-06-15",
          "location": "[resourceGroup().location]",
          "properties": {
            "accountType": "Standard_LRS"
          }
        }
      ],
      "outputs": {}
    },
    "parameters": {
      "appSku": {
        "value": {
          "code": "f1",
          "name": "Free"
        }
      },
      "servicePlan": {
        "value": "PlanBOSpace"
      },
      "ranks": {
        "value": [
          "a",
          "b"
        ]
      }
    },
    "mode": "Incremental"
  }
}

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
Created

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
Azure-AsyncOperation          : https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate/operationStatuses/08586635348074992115?api-version=2017-05-10
x-ms-ratelimit-remaining-subscription-writes: 1198
x-ms-request-id               : afa0e7ac-02b7-48cc-8a29-5bafefa83baa
x-ms-correlation-request-id   : afa0e7ac-02b7-48cc-8a29-5bafefa83baa
x-ms-routing-request-id       : NORTHCENTRALUS:20180927T181438Z:afa0e7ac-02b7-48cc-8a29-5bafefa83baa
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Thu, 27 Sep 2018 18:14:37 GMT

Body:
{
  "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate",
  "name": "complexParametersTemplate",
  "properties": {
    "templateHash": "6287512875150736918",
    "parameters": {
      "appSku": {
        "type": "Object",
        "value": {
          "code": "f1",
          "name": "Free"
        }
      },
      "servicePlan": {
        "type": "String",
        "value": "PlanBOSpace"
      },
      "ranks": {
        "type": "Array",
        "value": [
          "a",
          "b"
        ]
      }
    },
    "mode": "Incremental",
    "provisioningState": "Accepted",
    "timestamp": "2018-09-27T18:14:38.393472Z",
    "duration": "PT0.4150674S",
    "correlationId": "afa0e7ac-02b7-48cc-8a29-5bafefa83baa",
    "providers": [
      {
        "namespace": "Microsoft.Storage",
        "resourceTypes": [
          {
            "resourceType": "storageAccounts",
            "locations": [
              "eastus"
            ]
          }
        ]
      }
    ],
    "dependencies": []
  }
}

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/deployments/complexParametersTemplate/operations?api-version=2017-05-10

Headers:
x-ms-client-request-id        : 6a6dd2d2-e8b6-45bf-a073-ee17b7315292
Accept-Language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-request-id               : 8a52558e-afa6-4a91-b0f6-bde4b115bf0a
x-ms-correlation-request-id   : 8a52558e-afa6-4a91-b0f6-bde4b115bf0a
x-ms-routing-request-id       : NORTHCENTRALUS:20180927T181443Z:8a52558e-afa6-4a91-b0f6-bde4b115bf0a
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Thu, 27 Sep 2018 18:14:42 GMT

Body:
{
  "value": [
    {
      "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate/operations/10340A3D37B1A72D",
      "operationId": "10340A3D37B1A72D",
      "properties": {
        "provisioningOperation": "Create",
        "provisioningState": "Running",
        "timestamp": "2018-09-27T18:14:43.5570664Z",
        "duration": "PT4.808616S",
        "trackingId": "e7462be3-1dae-4b9c-a96b-06bbd63fc898",
        "serviceRequestId": "515c4e8c-c938-4e84-8da9-d6f604631014",
        "statusCode": "Accepted",
        "targetResource": {
          "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Storage/storageAccounts/tianotest010f1a",
          "resourceType": "Microsoft.Storage/storageAccounts",
          "resourceName": "tianotest010f1a"
        }
      }
    }
  ]
}

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate?api-version=2017-05-10

Headers:
x-ms-client-request-id        : 0c95bbc1-576a-41a7-85d8-96f50989075e
Accept-Language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
Retry-After                   : 18
x-ms-ratelimit-remaining-subscription-reads: 11998
x-ms-request-id               : 1564e30d-9b3f-4dba-9e6f-ccbc82eeba06
x-ms-correlation-request-id   : 1564e30d-9b3f-4dba-9e6f-ccbc82eeba06
x-ms-routing-request-id       : NORTHCENTRALUS:20180927T181443Z:1564e30d-9b3f-4dba-9e6f-ccbc82eeba06
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Thu, 27 Sep 2018 18:14:43 GMT

Body:
{
  "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate",
  "name": "complexParametersTemplate",
  "properties": {
    "templateHash": "6287512875150736918",
    "parameters": {
      "appSku": {
        "type": "Object",
        "value": {
          "code": "f1",
          "name": "Free"
        }
      },
      "servicePlan": {
        "type": "String",
        "value": "PlanBOSpace"
      },
      "ranks": {
        "type": "Array",
        "value": [
          "a",
          "b"
        ]
      }
    },
    "mode": "Incremental",
    "provisioningState": "Running",
    "timestamp": "2018-09-27T18:14:43.4377325Z",
    "duration": "PT5.4593279S",
    "correlationId": "afa0e7ac-02b7-48cc-8a29-5bafefa83baa",
    "providers": [
      {
        "namespace": "Microsoft.Storage",
        "resourceTypes": [
          {
            "resourceType": "storageAccounts",
            "locations": [
              "eastus"
            ]
          }
        ]
      }
    ],
    "dependencies": []
  }
}

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/deployments/complexParametersTemplate/operations?api-version=2017-05-10

Headers:
x-ms-client-request-id        : eb667d32-371b-4ec3-90da-6ce71667b20d
Accept-Language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11997
x-ms-request-id               : 041c64af-3c58-45e1-8b31-964f10e25448
x-ms-correlation-request-id   : 041c64af-3c58-45e1-8b31-964f10e25448
x-ms-routing-request-id       : NORTHCENTRALUS:20180927T181502Z:041c64af-3c58-45e1-8b31-964f10e25448
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Thu, 27 Sep 2018 18:15:01 GMT

Body:
{
  "value": [
    {
      "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate/operations/10340A3D37B1A72D",
      "operationId": "10340A3D37B1A72D",
      "properties": {
        "provisioningOperation": "Create",
        "provisioningState": "Running",
        "timestamp": "2018-09-27T18:15:01.0131505Z",
        "duration": "PT22.2647001S",
        "trackingId": "67d862f3-f2d5-4f14-90c4-26b8df13149f",
        "serviceRequestId": "515c4e8c-c938-4e84-8da9-d6f604631014",
        "statusCode": "OK",
        "targetResource": {
          "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Storage/storageAccounts/tianotest010f1a",
          "resourceType": "Microsoft.Storage/storageAccounts",
          "resourceName": "tianotest010f1a"
        }
      }
    }
  ]
}

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate?api-version=2017-05-10

Headers:
x-ms-client-request-id        : cfcfecbf-9ec0-4a19-916f-a290877e86c9
Accept-Language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
Retry-After                   : 5
x-ms-ratelimit-remaining-subscription-reads: 11996
x-ms-request-id               : 20bd2cbf-4878-479c-9a9b-3eca233ad6b9
x-ms-correlation-request-id   : 20bd2cbf-4878-479c-9a9b-3eca233ad6b9
x-ms-routing-request-id       : NORTHCENTRALUS:20180927T181502Z:20bd2cbf-4878-479c-9a9b-3eca233ad6b9
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Thu, 27 Sep 2018 18:15:01 GMT

Body:
{
  "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate",
  "name": "complexParametersTemplate",
  "properties": {
    "templateHash": "6287512875150736918",
    "parameters": {
      "appSku": {
        "type": "Object",
        "value": {
          "code": "f1",
          "name": "Free"
        }
      },
      "servicePlan": {
        "type": "String",
        "value": "PlanBOSpace"
      },
      "ranks": {
        "type": "Array",
        "value": [
          "a",
          "b"
        ]
      }
    },
    "mode": "Incremental",
    "provisioningState": "Running",
    "timestamp": "2018-09-27T18:14:43.4377325Z",
    "duration": "PT5.4593279S",
    "correlationId": "afa0e7ac-02b7-48cc-8a29-5bafefa83baa",
    "providers": [
      {
        "namespace": "Microsoft.Storage",
        "resourceTypes": [
          {
            "resourceType": "storageAccounts",
            "locations": [
              "eastus"
            ]
          }
        ]
      }
    ],
    "dependencies": []
  }
}

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/deployments/complexParametersTemplate/operations?api-version=2017-05-10

Headers:
x-ms-client-request-id        : 199efca3-217a-4199-a2fd-23d50765f53e
Accept-Language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11995
x-ms-request-id               : 92c4acbb-90b6-4d68-8560-dc2ea7907710
x-ms-correlation-request-id   : 92c4acbb-90b6-4d68-8560-dc2ea7907710
x-ms-routing-request-id       : NORTHCENTRALUS:20180927T181507Z:92c4acbb-90b6-4d68-8560-dc2ea7907710
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Thu, 27 Sep 2018 18:15:07 GMT

Body:
{
  "value": [
    {
      "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate/operations/10340A3D37B1A72D",
      "operationId": "10340A3D37B1A72D",
      "properties": {
        "provisioningOperation": "Create",
        "provisioningState": "Succeeded",
        "timestamp": "2018-09-27T18:15:06.5575573Z",
        "duration": "PT27.8091069S",
        "trackingId": "d16a06ba-03f5-43d9-be97-fc192cb17e2f",
        "serviceRequestId": "515c4e8c-c938-4e84-8da9-d6f604631014",
        "statusCode": "OK",
        "targetResource": {
          "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Storage/storageAccounts/tianotest010f1a",
          "resourceType": "Microsoft.Storage/storageAccounts",
          "resourceName": "tianotest010f1a"
        }
      }
    }
  ]
}

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate?api-version=2017-05-10

Headers:
x-ms-client-request-id        : 68dadb07-eb8e-4699-a2b1-3c937948a59e
Accept-Language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
Retry-After                   : 5
x-ms-ratelimit-remaining-subscription-reads: 11994
x-ms-request-id               : f11ae0e7-9169-4cf6-8eb0-8086a1722da1
x-ms-correlation-request-id   : f11ae0e7-9169-4cf6-8eb0-8086a1722da1
x-ms-routing-request-id       : NORTHCENTRALUS:20180927T181507Z:f11ae0e7-9169-4cf6-8eb0-8086a1722da1
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Thu, 27 Sep 2018 18:15:07 GMT

Body:
{
  "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate",
  "name": "complexParametersTemplate",
  "properties": {
    "templateHash": "6287512875150736918",
    "parameters": {
      "appSku": {
        "type": "Object",
        "value": {
          "code": "f1",
          "name": "Free"
        }
      },
      "servicePlan": {
        "type": "String",
        "value": "PlanBOSpace"
      },
      "ranks": {
        "type": "Array",
        "value": [
          "a",
          "b"
        ]
      }
    },
    "mode": "Incremental",
    "provisioningState": "Running",
    "timestamp": "2018-09-27T18:14:43.4377325Z",
    "duration": "PT5.4593279S",
    "correlationId": "afa0e7ac-02b7-48cc-8a29-5bafefa83baa",
    "providers": [
      {
        "namespace": "Microsoft.Storage",
        "resourceTypes": [
          {
            "resourceType": "storageAccounts",
            "locations": [
              "eastus"
            ]
          }
        ]
      }
    ],
    "dependencies": []
  }
}

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/deployments/complexParametersTemplate/operations?api-version=2017-05-10

Headers:
x-ms-client-request-id        : 38da998b-9fe3-4674-88f7-dc42430b85dd
Accept-Language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11993
x-ms-request-id               : 4179f2cc-e5fa-478a-b6a0-b9a43d68085f
x-ms-correlation-request-id   : 4179f2cc-e5fa-478a-b6a0-b9a43d68085f
x-ms-routing-request-id       : NORTHCENTRALUS:20180927T181512Z:4179f2cc-e5fa-478a-b6a0-b9a43d68085f
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Thu, 27 Sep 2018 18:15:12 GMT

Body:
{
  "value": [
    {
      "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate/operations/10340A3D37B1A72D",
      "operationId": "10340A3D37B1A72D",
      "properties": {
        "provisioningOperation": "Create",
        "provisioningState": "Succeeded",
        "timestamp": "2018-09-27T18:15:06.5575573Z",
        "duration": "PT27.8091069S",
        "trackingId": "d16a06ba-03f5-43d9-be97-fc192cb17e2f",
        "serviceRequestId": "515c4e8c-c938-4e84-8da9-d6f604631014",
        "statusCode": "OK",
        "targetResource": {
          "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Storage/storageAccounts/tianotest010f1a",
          "resourceType": "Microsoft.Storage/storageAccounts",
          "resourceName": "tianotest010f1a"
        }
      }
    },
    {
      "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate/operations/08586635348074992115",
      "operationId": "08586635348074992115",
      "properties": {
        "provisioningOperation": "EvaluateDeploymentOutput",
        "provisioningState": "Succeeded",
        "timestamp": "2018-09-27T18:15:09.3254342Z",
        "duration": "PT2.5212061S",
        "trackingId": "76b7b63b-951a-48ed-b50c-28bcd52d1b96",
        "statusCode": "OK",
        "statusMessage": null
      }
    }
  ]
}

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate?api-version=2017-05-10

Headers:
x-ms-client-request-id        : ef4713c7-072e-4a78-a5ba-1275406bc680
Accept-Language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11992
x-ms-request-id               : 445d9768-20c2-44c9-8900-38b9ec1005fb
x-ms-correlation-request-id   : 445d9768-20c2-44c9-8900-38b9ec1005fb
x-ms-routing-request-id       : NORTHCENTRALUS:20180927T181512Z:445d9768-20c2-44c9-8900-38b9ec1005fb
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Thu, 27 Sep 2018 18:15:12 GMT

Body:
{
  "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate",
  "name": "complexParametersTemplate",
  "properties": {
    "templateHash": "6287512875150736918",
    "parameters": {
      "appSku": {
        "type": "Object",
        "value": {
          "code": "f1",
          "name": "Free"
        }
      },
      "servicePlan": {
        "type": "String",
        "value": "PlanBOSpace"
      },
      "ranks": {
        "type": "Array",
        "value": [
          "a",
          "b"
        ]
      }
    },
    "mode": "Incremental",
    "provisioningState": "Succeeded",
    "timestamp": "2018-09-27T18:15:09.3984169Z",
    "duration": "PT31.4200123S",
    "correlationId": "afa0e7ac-02b7-48cc-8a29-5bafefa83baa",
    "providers": [
      {
        "namespace": "Microsoft.Storage",
        "resourceTypes": [
          {
            "resourceType": "storageAccounts",
            "locations": [
              "eastus"
            ]
          }
        ]
      }
    ],
    "dependencies": [],
    "outputs": {},
    "outputResources": [
      {
        "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Storage/storageAccounts/tianotest010f1a"
      }
    ]
  }
}

DEBUG: AzureQoSEvent: CommandName - New-AzureRmResourceGroupDeployment; IsSuccess - True; Duration - 00:00:37.6451060; Exception - ;
DEBUG: Finish sending metric.
DEBUG: 1:15:12 PM - NewAzureResourceGroupDeploymentCmdlet end processing.
DEBUG: 1:15:12 PM - NewAzureResourceGroupDeploymentCmdlet end processing.
PS C:\src\github>
PS C:\src\github> # 4. Verify that the output parameters match the input.
PS C:\src\github> # The deployment variable here is the same as above.
PS C:\src\github> $workaround = $false
PS C:\src\github> $deployment = Get-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName
DEBUG: 1:15:12 PM - GetAzureResourceGroupDeploymentCmdlet begin processing with ParameterSet 'GetByResourceGroupDeploymentName'.
DEBUG: 1:15:12 PM - using account id 'user@domain.com'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'user@domain.com', environment: 'AzureCloud', tenant: 'd6f493b6-8cac-4ce3-ad45-59648959894e'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/?api-version=2017-05-10

Headers:
x-ms-client-request-id        : 0d747b75-950d-411f-b6d4-9700d04aa0ee
Accept-Language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-request-id               : f4ba7c85-9367-4755-b9f4-0146e1081ec5
x-ms-correlation-request-id   : f4ba7c85-9367-4755-b9f4-0146e1081ec5
x-ms-routing-request-id       : NORTHCENTRALUS:20180927T181513Z:f4ba7c85-9367-4755-b9f4-0146e1081ec5
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Date                          : Thu, 27 Sep 2018 18:15:13 GMT

Body:
{
  "value": [
    {
      "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/deployments/complexParametersTemplate",
      "name": "complexParametersTemplate",
      "properties": {
        "templateHash": "6287512875150736918",
        "parameters": {
          "appSku": {
            "type": "Object",
            "value": {
              "code": "f1",
              "name": "Free"
            }
          },
          "servicePlan": {
            "type": "String",
            "value": "PlanBOSpace"
          },
          "ranks": {
            "type": "Array",
            "value": [
              "a",
              "b"
            ]
          }
        },
        "mode": "Incremental",
        "provisioningState": "Succeeded",
        "timestamp": "2018-09-27T18:15:09.3984169Z",
        "duration": "PT31.4200123S",
        "correlationId": "afa0e7ac-02b7-48cc-8a29-5bafefa83baa",
        "providers": [
          {
            "namespace": "Microsoft.Storage",
            "resourceTypes": [
              {
                "resourceType": "storageAccounts",
                "locations": [
                  "eastus"
                ]
              }
            ]
          }
        ],
        "dependencies": [],
        "outputs": {},
        "outputResources": [
          {
            "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Storage/storageAccounts/tianotest010f1a"
          }
        ]
      }
    }
  ]
}

DEBUG: AzureQoSEvent: CommandName - Get-AzureRmResourceGroupDeployment; IsSuccess - True; Duration - 00:00:00.3684489; Exception - ;
DEBUG: Finish sending metric.
DEBUG: 1:15:14 PM - GetAzureResourceGroupDeploymentCmdlet end processing.
DEBUG: 1:15:14 PM - GetAzureResourceGroupDeploymentCmdlet end processing.
PS C:\src\github> foreach ($parameter in $deployment.Parameters.Keys) {
>>     $deploymentParameterValue = $deployment.Parameters.$parameter.Value
>>     # This workaround requires PowerShell Core 6.1
>>     if (($workaround) -and ($deployment.Parameters.$parameter.Type -eq "Object")) {
>>         Write-Verbose "Comparing an object."
>>         $deploymentParameterValue = ($deployment.Parameters.$parameter.Value.ToString() | ConvertFrom-Json -AsHashtable)
>>     }
>>     # This workaround works with PowerShell 5.1
>>     if (($workaround) -and ($deployment.Parameters.$parameter.Type -eq "Array")) {
>>         Write-Verbose "Comparing an array."
>>         $deploymentParameterValue = ($deployment.Parameters.$parameter.Value.ToString() | ConvertFrom-Json)
>>     }
>>     $objectComparisonResult = Compare-Object -ReferenceObject $templateParameters.$parameter -DifferenceObject $deploymentParameterValue
>>     if ($null -eq $objectComparisonResult) {
>>         Write-Host ("Matched: {0} {1} {2}" -f $parameter, $deployment.Parameters.$parameter.Type, $deployment.Parameters.$parameter.Value)
>>     } else {
>>         Write-Host "Failed!!"
>>         $objectComparisonResult
>>     }
>> }
Failed!!

Matched: servicePlan String PlanBOSpace
Failed!!
InputObject  SideIndicator
-----------  -------------
{}           =>
{}           =>
{code, name} <=
{}           =>
{}           =>
a            <=
b            <=

PS C:\src\github>
cormacpayne commented 5 years ago

@ignatz42 do you also see this issue when using the AzureRM.Resources module? I want to see if this is an issue with the service or the .NET Core version of the module.

ignatz42 commented 5 years ago

@cormacpayne Yes, if I understand your question, I see the same problem with AzureRM.Resources and should have noted that initially. I filled out the bug report sections with out from the same script in the original submission below. Thank you very much for looking at this problem. Please let me know if I can provide additional detail.

Module Version

PS C:\src\github> Get-Module -ListAvailable

    Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     5.3.0      Azure                               {Get-AzureAutomationCertificate, Get-AzureAutomationConnec...
Script     0.5.3      Azure.AnalysisServices              {Add-AzureAnalysisServicesAccount, Restart-AzureAnalysisSe...
Script     4.4.0      Azure.Storage                       {Get-AzureStorageTable, New-AzureStorageTableSASToken, New...
Binary     2.0.1.16   AzureAD                             {Add-AzureADApplicationOwner, Get-AzureADApplication, Get-...
Script     6.6.0      AzureRM
Script     0.6.11     AzureRM.AnalysisServices            {Resume-AzureRmAnalysisServicesServer, Suspend-AzureRmAnal...
Script     6.1.2      AzureRM.ApiManagement               {Add-AzureRmApiManagementRegion, Get-AzureRmApiManagementS...
Script     0.1.5      AzureRM.ApplicationInsights         {Get-AzureRmApplicationInsights, New-AzureRmApplicationIns...
Script     5.0.3      AzureRM.Automation                  {Get-AzureRMAutomationHybridWorkerGroup, Get-AzureRmAutoma...
Script     4.0.7      AzureRM.Backup                      {Backup-AzureRmBackupItem, Enable-AzureRmBackupContainerRe...
Script     4.1.2      AzureRM.Batch                       {Remove-AzureRmBatchAccount, Get-AzureRmBatchAccount, Get-...
Script     0.14.4     AzureRM.Billing                     {Get-AzureRmBillingInvoice, Get-AzureRmBillingPeriod, Get-...
Script     5.0.2      AzureRM.Cdn                         {Get-AzureRmCdnProfile, Get-AzureRmCdnProfileSsoUrl, New-A...
Script     0.9.7      AzureRM.CognitiveServices           {Get-AzureRmCognitiveServicesAccount, Get-AzureRmCognitive...
Script     5.4.0      AzureRM.Compute                     {Remove-AzureRmAvailabilitySet, Get-AzureRmAvailabilitySet...
Script     0.3.6      AzureRM.Consumption                 {Get-AzureRmConsumptionBudget, Get-AzureRmConsumptionMarke...
Script     0.2.7      AzureRM.ContainerInstance           {New-AzureRmContainerGroup, Get-AzureRmContainerGroup, Rem...
Script     1.0.7      AzureRM.ContainerRegistry           {New-AzureRmContainerRegistry, Get-AzureRmContainerRegistr...
Script     5.0.2      AzureRM.DataFactories               {Remove-AzureRmDataFactory, Get-AzureRmDataFactoryRun, Get...
Script     0.5.7      AzureRM.DataFactoryV2               {Set-AzureRmDataFactoryV2, Update-AzureRmDataFactoryV2, Ge...
Script     5.1.1      AzureRM.DataLakeAnalytics           {Get-AzureRmDataLakeAnalyticsDataSource, New-AzureRmDataLa...
Script     6.1.1      AzureRM.DataLakeStore               {Get-AzureRmDataLakeStoreTrustedIdProvider, Remove-AzureRm...
Script     4.0.6      AzureRM.DevTestLabs                 {Get-AzureRmDtlAllowedVMSizesPolicy, Get-AzureRmDtlAutoShu...
Script     5.0.1      AzureRM.Dns                         {Get-AzureRmDnsRecordSet, New-AzureRmDnsRecordConfig, Remo...
Script     0.3.6      AzureRM.EventGrid                   {New-AzureRmEventGridTopic, Get-AzureRmEventGridTopic, Set...
Script     0.6.7      AzureRM.EventHub                    {New-AzureRmEventHubNamespace, Get-AzureRmEventHubNamespac...
Script     4.1.5      AzureRM.HDInsight                   {Get-AzureRmHDInsightJob, New-AzureRmHDInsightSqoopJobDefi...
Script     5.1.0      AzureRM.Insights                    {Get-AzureRmMetricDefinition, Get-AzureRmMetric, Remove-Az...
Script     3.1.5      AzureRM.IotHub                      {Add-AzureRmIotHubKey, Get-AzureRmIotHubEventHubConsumerGr...
Script     5.1.0      AzureRM.KeyVault                    {Add-AzureKeyVaultCertificate, Update-AzureKeyVaultCertifi...
Script     4.1.1      AzureRM.LogicApp                    {Get-AzureRmIntegrationAccountAgreement, Get-AzureRmIntegr...
Script     0.18.2     AzureRM.MachineLearning             {Move-AzureRmMlCommitmentAssociation, Get-AzureRmMlCommitm...
Script     0.4.5      AzureRM.MachineLearningCompute      {Get-AzureRmMlOpCluster, Get-AzureRmMlOpClusterKey, Test-A...
Script     0.2.4      AzureRM.MarketplaceOrdering         {Get-AzureRmMarketplaceTerms, Set-AzureRmMarketplaceTerms}
Script     0.10.1     AzureRM.Media                       {Sync-AzureRmMediaServiceStorageKeys, Set-AzureRmMediaServ...
Script     6.4.1      AzureRM.Network                     {Add-AzureRmApplicationGatewayAuthenticationCertificate, G...
Script     5.0.2      AzureRM.NotificationHubs            {Get-AzureRmNotificationHub, Get-AzureRmNotificationHubAut...
Script     5.0.3      AzureRM.OperationalInsights         {New-AzureRmOperationalInsightsAzureActivityLogDataSource,...
Script     1.0.3      AzureRM.PolicyInsights              {Get-AzureRmPolicyEvent, Get-AzureRmPolicyState, Get-Azure...
Script     4.1.7      AzureRM.PowerBIEmbedded             {Remove-AzureRmPowerBIWorkspaceCollection, Get-AzureRmPowe...
Script     5.3.4      AzureRM.profile                     {Disable-AzureRmDataCollection, Disable-AzureRmContextAuto...
Script     4.1.5      AzureRM.RecoveryServices            {Get-AzureRmRecoveryServicesBackupProperty, Get-AzureRmRec...
Script     4.3.1      AzureRM.RecoveryServices.Backup     {Backup-AzureRmRecoveryServicesBackupItem, Get-AzureRmReco...
Script     0.2.7      AzureRM.RecoveryServices.SiteRec... {Edit-AzureRmRecoveryServicesAsrRecoveryPlan, Get-AzureRmR...
Script     5.0.2      AzureRM.RedisCache                  {Remove-AzureRmRedisCachePatchSchedule, New-AzureRmRedisCa...
Script     0.3.7      AzureRM.Relay                       {New-AzureRmRelayNamespace, Get-AzureRmRelayNamespace, Set...
Script     6.3.0      AzureRM.Resources                   {Get-AzureRmProviderOperation, Remove-AzureRmRoleAssignmen...
Script     6.2.0      AzureRM.Resources                   {Get-AzureRmProviderOperation, Remove-AzureRmRoleAssignmen...
Script     0.16.7     AzureRM.Scheduler                   {Disable-AzureRmSchedulerJobCollection, Enable-AzureRmSche...
Script     0.6.8      AzureRM.ServiceBus                  {New-AzureRmServiceBusNamespace, Get-AzureRmServiceBusName...
Script     0.3.9      AzureRM.ServiceFabric               {Add-AzureRmServiceFabricApplicationCertificate, Add-Azure...
Script     4.11.0     AzureRM.Sql                         {Get-AzureRmSqlDatabaseTransparentDataEncryption, Get-Azur...
Script     5.0.1      AzureRM.Storage                     {Get-AzureRmStorageAccount, Get-AzureRmStorageAccountKey, ...
Script     4.0.7      AzureRM.StreamAnalytics             {Get-AzureRmStreamAnalyticsFunction, Get-AzureRmStreamAnal...
Script     4.0.4      AzureRM.Tags                        {Remove-AzureRmTag, Get-AzureRmTag, New-AzureRmTag}
Script     4.0.8      AzureRM.TrafficManager              {Disable-AzureRmTrafficManagerEndpoint, Enable-AzureRmTraf...
Script     4.0.4      AzureRM.UsageAggregates             Get-UsageAggregates
Script     5.0.6      AzureRM.Websites                    {Get-AzureRmAppServicePlan, Set-AzureRmAppServicePlan, New...
Script     5.2.0      ImportExcel                         {ColorCompletion, Send-SQLDataToExcel, Join-Worksheet, Exp...
Script     5.4.1      InvokeBuild                         {Invoke-Build, Build-Checkpoint, Build-Parallel}
Script     1.0.1      Microsoft.PowerShell.Operation.V... {Get-OperationValidation, Invoke-OperationValidation}
Script     1.1.7.2    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-Packa...
Binary     1.0.0.1    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-Packa...
Script     4.4.0      Pester                              {Describe, Context, It, Should...}
Script     3.4.0      Pester                              {Describe, Context, It, Should...}
Script     1.1.3      Plaster                             {Invoke-Plaster, New-PlasterManifest, Get-PlasterTemplate,...
Script     0.9.0      platyPS                             {New-MarkdownHelp, Get-MarkdownMetadata, New-ExternalHelp,...
Script     1.6.0      PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...}
Script     1.0.0.1    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...}
Script     4.7.0      psake                               {Invoke-psake, Invoke-Task, Get-PSakeScriptTasks, Task...}
Script     0.2.26     PSCodeHealth                        {Invoke-PSCodeHealth, Get-PSCodeHealthComplianceRule, Test...
Script     1.2        PSReadline                          {Get-PSReadlineKeyHandler, Set-PSReadlineKeyHandler, Remov...
Script     1.17.1     PSScriptAnalyzer                    {Get-ScriptAnalyzerRule, Invoke-ScriptAnalyzer, Invoke-For...
Script     1.16.1     PSScriptAnalyzer                    {Get-ScriptAnalyzerRule, Invoke-ScriptAnalyzer, Invoke-For...
Script     0.7.5      SHiPS
Manifest   3.0.2      VSTeam                              {Add-VSTeamAzureRMServiceEndpoint, Add-VSTeamSonarQubeEndp...

    Directory: C:\windows\system32\WindowsPowerShell\v1.0\Modules

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   1.0.0.0    AppBackgroundTask                   {Disable-AppBackgroundTaskDiagnosticLog, Enable-AppBackgro...
Manifest   2.0.0.0    Appx                                {Add-AppxPackage, Get-AppxPackage, Get-AppxPackageManifest...
Manifest   1.0.0.0    BitLocker                           {Unlock-BitLocker, Suspend-BitLocker, Resume-BitLocker, Re...
Manifest   2.0.0.0    BitsTransfer                        {Add-BitsFile, Complete-BitsTransfer, Get-BitsTransfer, Re...
Manifest   1.0.0.0    CimCmdlets                          {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance,...
Manifest   1.0        Defender                            {Get-MpPreference, Set-MpPreference, Add-MpPreference, Rem...
Manifest   1.0.0.0    DeliveryOptimization                {Get-DeliveryOptimizationStatus, Get-DeliveryOptimizationP...
Manifest   1.0.0.0    DirectAccessClientComponents        {Disable-DAManualEntryPointSelection, Enable-DAManualEntry...
Script     3.0        Dism                                {Add-AppxProvisionedPackage, Add-WindowsDriver, Add-Window...
Manifest   1.0.0.0    DnsClient                           {Resolve-DnsName, Clear-DnsClientCache, Get-DnsClient, Get...
Manifest   1.0.0.0    EventTracingManagement              {Start-EtwTraceSession, New-EtwTraceSession, Get-EtwTraceS...
Manifest   2.0.0.0    International                       {Get-WinDefaultInputMethodOverride, Set-WinDefaultInputMet...
Manifest   1.0.0.0    iSCSI                               {Get-IscsiTargetPortal, New-IscsiTargetPortal, Remove-Iscs...
Script     1.0.0.0    ISE                                 {New-IseSnippet, Import-IseSnippet, Get-IseSnippet}
Manifest   1.0.0.0    Kds                                 {Add-KdsRootKey, Get-KdsRootKey, Test-KdsRootKey, Set-KdsC...
Manifest   1.0.1.0    Microsoft.PowerShell.Archive        {Compress-Archive, Expand-Archive}
Manifest   3.0.0.0    Microsoft.PowerShell.Diagnostics    {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter...
Manifest   3.0.0.0    Microsoft.PowerShell.Host           {Start-Transcript, Stop-Transcript}
Manifest   1.0.0.0    Microsoft.PowerShell.LocalAccounts  {Add-LocalGroupMember, Disable-LocalUser, Enable-LocalUser...
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...
Script     1.0        Microsoft.PowerShell.ODataUtils     Export-ODataEndpointProxy
Manifest   3.0.0.0    Microsoft.PowerShell.Security       {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...}
Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Format-List, Format-Custom, Format-Table, Format-Wide...}
Manifest   3.0.0.0    Microsoft.WSMan.Management          {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredS...
Manifest   1.0        MMAgent                             {Disable-MMAgent, Enable-MMAgent, Set-MMAgent, Get-MMAgent...
Manifest   1.0.0.0    MsDtc                               {New-DtcDiagnosticTransaction, Complete-DtcDiagnosticTrans...
Manifest   2.0.0.0    NetAdapter                          {Disable-NetAdapter, Disable-NetAdapterBinding, Disable-Ne...
Manifest   1.0.0.0    NetConnection                       {Get-NetConnectionProfile, Set-NetConnectionProfile}
Manifest   1.0.0.0    NetDiagnostics                      Get-NetView
Manifest   1.0.0.0    NetEventPacketCapture               {New-NetEventSession, Remove-NetEventSession, Get-NetEvent...
Manifest   2.0.0.0    NetLbfo                             {Add-NetLbfoTeamMember, Add-NetLbfoTeamNic, Get-NetLbfoTea...
Manifest   1.0.0.0    NetNat                              {Get-NetNat, Get-NetNatExternalAddress, Get-NetNatStaticMa...
Manifest   2.0.0.0    NetQos                              {Get-NetQosPolicy, Set-NetQosPolicy, Remove-NetQosPolicy, ...
Manifest   2.0.0.0    NetSecurity                         {Get-DAPolicyChange, New-NetIPsecAuthProposal, New-NetIPse...
Manifest   1.0.0.0    NetSwitchTeam                       {New-NetSwitchTeam, Remove-NetSwitchTeam, Get-NetSwitchTea...
Manifest   1.0.0.0    NetTCPIP                            {Get-NetIPAddress, Get-NetIPInterface, Get-NetIPv4Protocol...
Manifest   1.0.0.0    NetworkConnectivityStatus           {Get-DAConnectionStatus, Get-NCSIPolicyConfiguration, Rese...
Manifest   1.0.0.0    NetworkSwitchManager                {Disable-NetworkSwitchEthernetPort, Enable-NetworkSwitchEt...
Manifest   1.0.0.0    NetworkTransition                   {Add-NetIPHttpsCertBinding, Disable-NetDnsTransitionConfig...
Manifest   1.0.0.0    PcsvDevice                          {Get-PcsvDevice, Start-PcsvDevice, Stop-PcsvDevice, Restar...
Binary     1.0.0.0    PersistentMemory                    {Get-PmemDisk, Get-PmemPhysicalDevice, Get-PmemUnusedRegio...
Manifest   1.0.0.0    PKI                                 {Add-CertificateEnrollmentPolicyServer, Export-Certificate...
Manifest   1.0.0.0    PnpDevice                           {Get-PnpDevice, Get-PnpDeviceProperty, Enable-PnpDevice, D...
Manifest   1.1        PrintManagement                     {Add-Printer, Add-PrinterDriver, Add-PrinterPort, Get-Prin...
Binary     1.0.11     ProcessMitigations                  {Get-ProcessMitigation, Set-ProcessMitigation, ConvertTo-P...
Script     3.0        Provisioning                        {Install-ProvisioningPackage, Export-ProvisioningPackage, ...
Manifest   1.1        PSDesiredStateConfiguration         {Set-DscLocalConfigurationManager, Start-DscConfiguration,...
Script     1.0.0.0    PSDiagnostics                       {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WS...
Binary     1.1.0.0    PSScheduledJob                      {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-Jo...
Manifest   2.0.0.0    PSWorkflow                          {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn}
Manifest   1.0.0.0    PSWorkflowUtility                   Invoke-AsWorkflow
Manifest   1.0.0.0    ScheduledTasks                      {Get-ScheduledTask, Set-ScheduledTask, Register-ScheduledT...
Manifest   2.0.0.0    SecureBoot                          {Confirm-SecureBootUEFI, Set-SecureBootUEFI, Get-SecureBoo...
Manifest   2.0.0.0    SmbShare                            {Get-SmbShare, Remove-SmbShare, Set-SmbShare, Block-SmbSha...
Manifest   2.0.0.0    SmbWitness                          {Get-SmbWitnessClient, Move-SmbWitnessClient, gsmbw, msmbw...
Manifest   1.0.0.0    StartLayout                         {Export-StartLayout, Import-StartLayout, Export-StartLayou...
Manifest   2.0.0.0    Storage                             {Add-InitiatorIdToMaskingSet, Add-PartitionAccessPath, Add...
Manifest   2.0.0.0    TLS                                 {New-TlsSessionTicketKey, Enable-TlsSessionTicketKey, Disa...
Manifest   1.0.0.0    TroubleshootingPack                 {Get-TroubleshootingPack, Invoke-TroubleshootingPack}
Manifest   2.0.0.0    TrustedPlatformModule               {Get-Tpm, Initialize-Tpm, Clear-Tpm, Unblock-Tpm...}
Manifest   2.0.0.0    VpnClient                           {Add-VpnConnection, Set-VpnConnection, Remove-VpnConnectio...
Manifest   1.0.0.0    Wdac                                {Get-OdbcDriver, Set-OdbcDriver, Get-OdbcDsn, Add-OdbcDsn...}
Manifest   1.0.0.0    WindowsDeveloperLicense             {Get-WindowsDeveloperLicense, Unregister-WindowsDeveloperL...
Script     1.0        WindowsErrorReporting               {Enable-WindowsErrorReporting, Disable-WindowsErrorReporti...
Manifest   1.0.0.0    WindowsSearch                       {Get-WindowsSearchSetting, Set-WindowsSearchSetting}
Manifest   1.0.0.0    WindowsUpdate                       Get-WindowsUpdateLog
Manifest   1.0.0.2    WindowsUpdateProvider               {Get-WUAVersion, Get-WULastInstallationDate, Get-WULastSca...

    Directory: C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Modules

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Binary     6.0.0.0    VMware.VimAutomation.Cis.Core
Binary     6.3.0.0    VMware.VimAutomation.Cloud
Manifest   6.3.0.0    VMware.VimAutomation.Common
Manifest   6.3.0.0    VMware.VimAutomation.Core           HookGetViewAutoCompleter
Binary     6.0.0.0    VMware.VimAutomation.HA
Binary     1.0.0.0    VMware.VimAutomation.License
Binary     6.0.0.0    VMware.VimAutomation.PCloud
Manifest   6.3.0.0    VMware.VimAutomation.SDK
Binary     6.0.0.0    VMware.VimAutomation.Storage
Binary     6.3.0.0    VMware.VimAutomation.Vds
Binary     6.3.0.0    VMware.VimAutomation.vROps
Binary     6.0.0.0    VMware.VumAutomation

    Directory: C:\Program Files (x86)\Microsoft SQL Server\140\Tools\PowerShell\Modules

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   14.0       SQLPS                               {Backup-SqlDatabase, Save-SqlMigrationReport, Add-SqlAvail...

Environment Data

PS C:\src\github> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.17134.228
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17134.228
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Debug Output

PS C:\src\github> $DebugPreference='Continue'
PS C:\src\github> # 1. Download the test
>> $complexTemplateURL = "https://github.com/Azure/azure-powershell/raw/master/src/ResourceManager/Resources/Commands.Re
sources.Test/complexParametersTemplate.json"
>> $response = Invoke-WebRequest -Uri $complexTemplateURL
>> if ($response.StatusCode -ne "200") {throw "Download Failed"}
>> $response.Content | Out-File "complexParametersTemplate.json" -Force
>>
PS C:\src\github> # 2. Create a Resource Group
>> $resourceGroupName = "deploymentTest-rg"
>> $location = "East US"
>> $rg = New-AzureRmResourceGroup -Name $resourceGroupName -Location $location
>> if ($null -eq $rg) {throw "Sort the problem with the resource group"}
>>
DEBUG: 8:41:44 AM - NewAzureResourceGroupCmdlet begin processing with ParameterSet '__AllParameterSets'.
DEBUG: 8:41:44 AM - using account id 'user@domain.com'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'user@domain.com', environment:
'AzureCloud', tenant: 'd6f493b6-8cac-4ce3-ad45-59648959894e'
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:41:44: 94c2f665-4143-47e6-8a06-a7b6a0edb9e2 - AcquireTokenHandlerBase: === Token Acquisition
started:
 Authority: https://login.microsoftonline.com/d6f493b6-8cac-4ce3-ad45-59648959894e/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (2 items)
 Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:41:44:  - TokenCache: Deserialized 2 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:41:44: 94c2f665-4143-47e6-8a06-a7b6a0edb9e2 - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:41:44: 94c2f665-4143-47e6-8a06-a7b6a0edb9e2 - TokenCache: An item matching the requested resource
was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:41:44: 94c2f665-4143-47e6-8a06-a7b6a0edb9e2 - TokenCache: 27.74682079 minutes left until token in
cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:41:44: 94c2f665-4143-47e6-8a06-a7b6a0edb9e2 - TokenCache: A matching item (access token or refresh
 token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:41:44: 94c2f665-4143-47e6-8a06-a7b6a0edb9e2 - AcquireTokenHandlerBase: === Token Acquisition
finished successfully. An access token was retuned:
 Access Token Hash: juZyML/zbFjY0J5DAJE6CzDp6jmhqhy8nSpRHBfnGU8=
 Refresh Token Hash: zfz0KVwmWI2gMqk7RaRJW+DDIoq13Bv9A3nXNaf7HBo=
 Expiration Time: 10/06/2018 14:09:29 +00:00
 User Hash: S2dLw2isvT5qfkLKdn7eXudzgliZ9uLPOVsxZnHpT9s=

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:41:44: 11c41e2f-7cb1-45ab-ae92-4c23af95ff7f - AcquireTokenHandlerBase: === Token Acquisition
started:
 Authority: https://login.microsoftonline.com/d6f493b6-8cac-4ce3-ad45-59648959894e/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (2 items)
 Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:41:44:  - TokenCache: Deserialized 2 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:41:44: 11c41e2f-7cb1-45ab-ae92-4c23af95ff7f - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:41:44: 11c41e2f-7cb1-45ab-ae92-4c23af95ff7f - TokenCache: An item matching the requested resource
was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:41:44: 11c41e2f-7cb1-45ab-ae92-4c23af95ff7f - TokenCache: 27.7467631966667 minutes left until
token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:41:44: 11c41e2f-7cb1-45ab-ae92-4c23af95ff7f - TokenCache: A matching item (access token or refresh
 token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:41:44: 11c41e2f-7cb1-45ab-ae92-4c23af95ff7f - AcquireTokenHandlerBase: === Token Acquisition
finished successfully. An access token was retuned:
 Access Token Hash: juZyML/zbFjY0J5DAJE6CzDp6jmhqhy8nSpRHBfnGU8=
 Refresh Token Hash: zfz0KVwmWI2gMqk7RaRJW+DDIoq13Bv9A3nXNaf7HBo=
 Expiration Time: 10/06/2018 14:09:29 +00:00
 User Hash: S2dLw2isvT5qfkLKdn7eXudzgliZ9uLPOVsxZnHpT9s=

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
HEAD

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg?api-ve
rsion=2017-05-10

Headers:
x-ms-client-request-id        : d16d4efa-43cd-41d9-ac4c-41ef71b4f1d7
accept-language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
NotFound

Headers:
Pragma                        : no-cache
x-ms-failure-cause            : gateway
x-ms-ratelimit-remaining-subscription-reads: 11998
x-ms-request-id               : b747ecda-6c7a-4307-9c2d-ca323117de8e
x-ms-correlation-request-id   : b747ecda-6c7a-4307-9c2d-ca323117de8e
x-ms-routing-request-id       : NORTHCENTRALUS:20181006T134144Z:b747ecda-6c7a-4307-9c2d-ca323117de8e
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Sat, 06 Oct 2018 13:41:43 GMT

Body:

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:41:44: ebfcb1d4-a9d1-4553-8c42-d1d1af323837 - AcquireTokenHandlerBase: === Token Acquisition
started:
 Authority: https://login.microsoftonline.com/d6f493b6-8cac-4ce3-ad45-59648959894e/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (2 items)
 Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:41:44:  - TokenCache: Deserialized 2 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:41:44: ebfcb1d4-a9d1-4553-8c42-d1d1af323837 - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:41:44: ebfcb1d4-a9d1-4553-8c42-d1d1af323837 - TokenCache: An item matching the requested resource
was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:41:44: ebfcb1d4-a9d1-4553-8c42-d1d1af323837 - TokenCache: 27.7440738483333 minutes left until
token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:41:44: ebfcb1d4-a9d1-4553-8c42-d1d1af323837 - TokenCache: A matching item (access token or refresh
 token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:41:44: ebfcb1d4-a9d1-4553-8c42-d1d1af323837 - AcquireTokenHandlerBase: === Token Acquisition
finished successfully. An access token was retuned:
 Access Token Hash: juZyML/zbFjY0J5DAJE6CzDp6jmhqhy8nSpRHBfnGU8=
 Refresh Token Hash: zfz0KVwmWI2gMqk7RaRJW+DDIoq13Bv9A3nXNaf7HBo=
 Expiration Time: 10/06/2018 14:09:29 +00:00
 User Hash: S2dLw2isvT5qfkLKdn7eXudzgliZ9uLPOVsxZnHpT9s=

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PUT

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg?api-ve
rsion=2017-05-10

Headers:
x-ms-client-request-id        : 85a70df9-3568-42b7-8023-82c40814a544
accept-language               : en-US

Body:
{
  "location": "East US"
}

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
Created

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-writes: 1199
x-ms-request-id               : 8c6b4a2d-2589-4ee1-a3ca-532f0702a171
x-ms-correlation-request-id   : 8c6b4a2d-2589-4ee1-a3ca-532f0702a171
x-ms-routing-request-id       : NORTHCENTRALUS:20181006T134145Z:8c6b4a2d-2589-4ee1-a3ca-532f0702a171
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Sat, 06 Oct 2018 13:41:44 GMT

Body:
{
  "id": "/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg",
  "name": "deploymentTest-rg",
  "location": "eastus",
  "properties": {
    "provisioningState": "Succeeded"
  }
}

DEBUG: AzureQoSEvent: CommandName - New-AzureRmResourceGroup; IsSuccess - True; Duration - 00:00:00.9820432; Exception
- ;
DEBUG: Finish sending metric.
DEBUG: 8:41:45 AM - NewAzureResourceGroupCmdlet end processing.
DEBUG: 8:41:45 AM - NewAzureResourceGroupCmdlet end processing.
PS C:\src\github> # 3. Deploy a the test template
>> $templateParameters = @{
>>     appSku      = @{
>>         code = "f1"
>>         name = "Free"
>>     }
>>     servicePlan = "PlanBOSpace"
>>     ranks       = @("a", "b")
>> }
>> $deployment = New-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateParameterObject $temp
lateParameters -TemplateFile "complexParametersTemplate.json" -Confirm:$false -Force
>>
DEBUG: 8:42:40 AM - NewAzureResourceGroupDeploymentCmdlet begin processing with ParameterSet
'ByTemplateFileAndParameterObject'.
DEBUG: 8:42:40 AM - using account id 'user@domain.com'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'user@domain.com', environment:
'AzureCloud', tenant: 'd6f493b6-8cac-4ce3-ad45-59648959894e'
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:40: c906be8b-92d1-4b5f-8208-09820524273f - AcquireTokenHandlerBase: === Token Acquisition
started:
 Authority: https://login.microsoftonline.com/d6f493b6-8cac-4ce3-ad45-59648959894e/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (2 items)
 Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:40:  - TokenCache: Deserialized 2 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:42:40: c906be8b-92d1-4b5f-8208-09820524273f - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:40: c906be8b-92d1-4b5f-8208-09820524273f - TokenCache: An item matching the requested resource
was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:42:40: c906be8b-92d1-4b5f-8208-09820524273f - TokenCache: 26.8140692183333 minutes left until
token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:40: c906be8b-92d1-4b5f-8208-09820524273f - TokenCache: A matching item (access token or refresh
 token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:40: c906be8b-92d1-4b5f-8208-09820524273f - AcquireTokenHandlerBase: === Token Acquisition
finished successfully. An access token was retuned:
 Access Token Hash: juZyML/zbFjY0J5DAJE6CzDp6jmhqhy8nSpRHBfnGU8=
 Refresh Token Hash: zfz0KVwmWI2gMqk7RaRJW+DDIoq13Bv9A3nXNaf7HBo=
 Expiration Time: 10/06/2018 14:09:29 +00:00
 User Hash: S2dLw2isvT5qfkLKdn7eXudzgliZ9uLPOVsxZnHpT9s=

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:40: 8152942c-51a7-4fc5-b10c-92ee90984df6 - AcquireTokenHandlerBase: === Token Acquisition
started:
 Authority: https://login.microsoftonline.com/d6f493b6-8cac-4ce3-ad45-59648959894e/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (2 items)
 Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:40:  - TokenCache: Deserialized 2 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:42:40: 8152942c-51a7-4fc5-b10c-92ee90984df6 - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:40: 8152942c-51a7-4fc5-b10c-92ee90984df6 - TokenCache: An item matching the requested resource
was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:42:40: 8152942c-51a7-4fc5-b10c-92ee90984df6 - TokenCache: 26.813382285 minutes left until token in
 cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:40: 8152942c-51a7-4fc5-b10c-92ee90984df6 - TokenCache: A matching item (access token or refresh
 token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:40: 8152942c-51a7-4fc5-b10c-92ee90984df6 - AcquireTokenHandlerBase: === Token Acquisition
finished successfully. An access token was retuned:
 Access Token Hash: juZyML/zbFjY0J5DAJE6CzDp6jmhqhy8nSpRHBfnGU8=
 Refresh Token Hash: zfz0KVwmWI2gMqk7RaRJW+DDIoq13Bv9A3nXNaf7HBo=
 Expiration Time: 10/06/2018 14:09:29 +00:00
 User Hash: S2dLw2isvT5qfkLKdn7eXudzgliZ9uLPOVsxZnHpT9s=

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
POST

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/provid
ers/Microsoft.Resources/deployments/complexParametersTemplate/validate?api-version=2017-05-10

Headers:
x-ms-client-request-id        : 7de2f36d-da33-4e3e-964d-263288e9a33d
accept-language               : en-US

Body:
{
  "properties": {
    "template": {
      "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
      "contentVersion": "1.0.0.0",
      "parameters": {
        "appSku": {
          "type": "object",
          "allowedValues": [
            {
              "code": "f1",
              "name": "Free"
            },
            {
              "code": "f2",
              "name": "Shared"
            },
            {
              "code": "f3",
              "name": {
                "major": "Official",
                "minor": "1.0"
              }
            }
          ],
          "defaultValue": {
            "code": "f1",
            "name": "Free"
          }
        },
        "servicePlan": {
          "type": "string"
        },
        "ranks": {
          "type": "array",
          "allowedValues": [
            [
              "a",
              "b"
            ],
            [
              "c",
              "d"
            ],
            [
              "d",
              "e",
              "f"
            ]
          ],
          "defaultValue": [
            "a",
            "b"
          ]
        }
      },
      "variables": {},
      "resources": [
        {
          "type": "Microsoft.Storage/storageAccounts",
          "name": "[concat('tianotest010', parameters('appSku').code, parameters('ranks')[0])]",
          "apiVersion": "2015-06-15",
          "location": "[resourceGroup().location]",
          "properties": {
            "accountType": "Standard_LRS"
          }
        }
      ],
      "outputs": {}
    },
    "parameters": {
      "servicePlan": {
        "value": "PlanBOSpace"
      },
      "appSku": {
        "value": {
          "code": "f1",
          "name": "Free"
        }
      },
      "ranks": {
        "value": [
          "a",
          "b"
        ]
      }
    },
    "mode": "Incremental"
  }
}

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-writes: 1199
x-ms-request-id               : 25f4eb05-32a4-4dd5-82c3-c83c3c932b6f
x-ms-correlation-request-id   : 25f4eb05-32a4-4dd5-82c3-c83c3c932b6f
x-ms-routing-request-id       : NORTHCENTRALUS:20181006T134242Z:25f4eb05-32a4-4dd5-82c3-c83c3c932b6f
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Sat, 06 Oct 2018 13:42:41 GMT

Body:
{
  "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/dep
loyments/complexParametersTemplate",
  "name": "complexParametersTemplate",
  "properties": {
    "templateHash": "6287512875150736918",
    "parameters": {
      "appSku": {
        "type": "Object",
        "value": {
          "code": "f1",
          "name": "Free"
        }
      },
      "servicePlan": {
        "type": "String",
        "value": "PlanBOSpace"
      },
      "ranks": {
        "type": "Array",
        "value": [
          "a",
          "b"
        ]
      }
    },
    "mode": "Incremental",
    "provisioningState": "Succeeded",
    "timestamp": "2018-10-06T13:42:42.0938616Z",
    "duration": "PT0S",
    "correlationId": "25f4eb05-32a4-4dd5-82c3-c83c3c932b6f",
    "providers": [
      {
        "namespace": "Microsoft.Storage",
        "resourceTypes": [
          {
            "resourceType": "storageAccounts",
            "locations": [
              "eastus"
            ]
          }
        ]
      }
    ],
    "dependencies": [],
    "validatedResources": [
      {
        "apiVersion": "2015-06-15",
        "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Storage/stora
geAccounts/tianotest010f1a",
        "name": "tianotest010f1a",
        "type": "Microsoft.Storage/storageAccounts",
        "location": "eastus",
        "properties": {
          "accountType": "Standard_LRS"
        }
      }
    ]
  }
}

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:42: 95c72a29-910b-4486-b302-b9e94bfcf28e - AcquireTokenHandlerBase: === Token Acquisition
started:
 Authority: https://login.microsoftonline.com/d6f493b6-8cac-4ce3-ad45-59648959894e/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (2 items)
 Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:42:  - TokenCache: Deserialized 2 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:42:42: 95c72a29-910b-4486-b302-b9e94bfcf28e - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:42: 95c72a29-910b-4486-b302-b9e94bfcf28e - TokenCache: An item matching the requested resource
was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:42:42: 95c72a29-910b-4486-b302-b9e94bfcf28e - TokenCache: 26.78233537 minutes left until token in
cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:42: 95c72a29-910b-4486-b302-b9e94bfcf28e - TokenCache: A matching item (access token or refresh
 token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:42: 95c72a29-910b-4486-b302-b9e94bfcf28e - AcquireTokenHandlerBase: === Token Acquisition
finished successfully. An access token was retuned:
 Access Token Hash: juZyML/zbFjY0J5DAJE6CzDp6jmhqhy8nSpRHBfnGU8=
 Refresh Token Hash: zfz0KVwmWI2gMqk7RaRJW+DDIoq13Bv9A3nXNaf7HBo=
 Expiration Time: 10/06/2018 14:09:29 +00:00
 User Hash: S2dLw2isvT5qfkLKdn7eXudzgliZ9uLPOVsxZnHpT9s=

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PUT

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/provid
ers/Microsoft.Resources/deployments/complexParametersTemplate?api-version=2017-05-10

Headers:
x-ms-client-request-id        : 1ae35e47-ec6d-49fc-a441-be2837166501
accept-language               : en-US

Body:
{
  "properties": {
    "template": {
      "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
      "contentVersion": "1.0.0.0",
      "parameters": {
        "appSku": {
          "type": "object",
          "allowedValues": [
            {
              "code": "f1",
              "name": "Free"
            },
            {
              "code": "f2",
              "name": "Shared"
            },
            {
              "code": "f3",
              "name": {
                "major": "Official",
                "minor": "1.0"
              }
            }
          ],
          "defaultValue": {
            "code": "f1",
            "name": "Free"
          }
        },
        "servicePlan": {
          "type": "string"
        },
        "ranks": {
          "type": "array",
          "allowedValues": [
            [
              "a",
              "b"
            ],
            [
              "c",
              "d"
            ],
            [
              "d",
              "e",
              "f"
            ]
          ],
          "defaultValue": [
            "a",
            "b"
          ]
        }
      },
      "variables": {},
      "resources": [
        {
          "type": "Microsoft.Storage/storageAccounts",
          "name": "[concat('tianotest010', parameters('appSku').code, parameters('ranks')[0])]",
          "apiVersion": "2015-06-15",
          "location": "[resourceGroup().location]",
          "properties": {
            "accountType": "Standard_LRS"
          }
        }
      ],
      "outputs": {}
    },
    "parameters": {
      "servicePlan": {
        "value": "PlanBOSpace"
      },
      "appSku": {
        "value": {
          "code": "f1",
          "name": "Free"
        }
      },
      "ranks": {
        "value": [
          "a",
          "b"
        ]
      }
    },
    "mode": "Incremental"
  }
}

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
Created

Headers:
Pragma                        : no-cache
Azure-AsyncOperation          :
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/provid
ers/Microsoft.Resources/deployments/complexParametersTemplate/operationStatuses/08586627735219835874?api-version=2017-0
5-10
x-ms-ratelimit-remaining-subscription-writes: 1198
x-ms-request-id               : 3b5b859c-f13f-4d23-b638-9747c052cf1f
x-ms-correlation-request-id   : 3b5b859c-f13f-4d23-b638-9747c052cf1f
x-ms-routing-request-id       : NORTHCENTRALUS:20181006T134244Z:3b5b859c-f13f-4d23-b638-9747c052cf1f
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Sat, 06 Oct 2018 13:42:43 GMT

Body:
{
  "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/dep
loyments/complexParametersTemplate",
  "name": "complexParametersTemplate",
  "properties": {
    "templateHash": "6287512875150736918",
    "parameters": {
      "appSku": {
        "type": "Object",
        "value": {
          "code": "f1",
          "name": "Free"
        }
      },
      "servicePlan": {
        "type": "String",
        "value": "PlanBOSpace"
      },
      "ranks": {
        "type": "Array",
        "value": [
          "a",
          "b"
        ]
      }
    },
    "mode": "Incremental",
    "provisioningState": "Accepted",
    "timestamp": "2018-10-06T13:42:43.8356128Z",
    "duration": "PT0.3415858S",
    "correlationId": "3b5b859c-f13f-4d23-b638-9747c052cf1f",
    "providers": [
      {
        "namespace": "Microsoft.Storage",
        "resourceTypes": [
          {
            "resourceType": "storageAccounts",
            "locations": [
              "eastus"
            ]
          }
        ]
      }
    ],
    "dependencies": []
  }
}

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:48: 9a374b8d-7d6d-44a7-b790-4ea58730c929 - AcquireTokenHandlerBase: === Token Acquisition
started:
 Authority: https://login.microsoftonline.com/d6f493b6-8cac-4ce3-ad45-59648959894e/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (2 items)
 Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:48:  - TokenCache: Deserialized 2 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:42:48: 9a374b8d-7d6d-44a7-b790-4ea58730c929 - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:48: 9a374b8d-7d6d-44a7-b790-4ea58730c929 - TokenCache: An item matching the requested resource
was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:42:48: 9a374b8d-7d6d-44a7-b790-4ea58730c929 - TokenCache: 26.6718347266667 minutes left until
token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:48: 9a374b8d-7d6d-44a7-b790-4ea58730c929 - TokenCache: A matching item (access token or refresh
 token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:48: 9a374b8d-7d6d-44a7-b790-4ea58730c929 - AcquireTokenHandlerBase: === Token Acquisition
finished successfully. An access token was retuned:
 Access Token Hash: juZyML/zbFjY0J5DAJE6CzDp6jmhqhy8nSpRHBfnGU8=
 Refresh Token Hash: zfz0KVwmWI2gMqk7RaRJW+DDIoq13Bv9A3nXNaf7HBo=
 Expiration Time: 10/06/2018 14:09:29 +00:00
 User Hash: S2dLw2isvT5qfkLKdn7eXudzgliZ9uLPOVsxZnHpT9s=

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/deploy
ments/complexParametersTemplate/operations?api-version=2017-05-10

Headers:
x-ms-client-request-id        : 5acbf669-a084-4bc4-9d14-c0ab31e3f1f0
accept-language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-request-id               : ad3ef855-3cef-4247-8c79-18344614529e
x-ms-correlation-request-id   : ad3ef855-3cef-4247-8c79-18344614529e
x-ms-routing-request-id       : NORTHCENTRALUS:20181006T134249Z:ad3ef855-3cef-4247-8c79-18344614529e
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Sat, 06 Oct 2018 13:42:48 GMT

Body:
{
  "value": [
    {
      "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/dep
loyments/complexParametersTemplate/operations/10340A3D37B1A72D",
      "operationId": "10340A3D37B1A72D",
      "properties": {
        "provisioningOperation": "Create",
        "provisioningState": "Running",
        "timestamp": "2018-10-06T13:42:48.5565355Z",
        "duration": "PT3.9324303S",
        "trackingId": "6a38d52c-9ffc-4d81-bdd0-537b40cc541e",
        "serviceRequestId": "98a3f9fd-2d5c-4b20-b872-dd4da0cc424d",
        "statusCode": "Accepted",
        "targetResource": {
          "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Storage/stora
geAccounts/tianotest010f1a",
          "resourceType": "Microsoft.Storage/storageAccounts",
          "resourceName": "tianotest010f1a"
        }
      }
    }
  ]
}

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:49: 0f4ffb38-6f6a-4a14-9582-b60cb204d203 - AcquireTokenHandlerBase: === Token Acquisition
started:
 Authority: https://login.microsoftonline.com/d6f493b6-8cac-4ce3-ad45-59648959894e/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (2 items)
 Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:49:  - TokenCache: Deserialized 2 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:42:49: 0f4ffb38-6f6a-4a14-9582-b60cb204d203 - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:49: 0f4ffb38-6f6a-4a14-9582-b60cb204d203 - TokenCache: An item matching the requested resource
was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:42:49: 0f4ffb38-6f6a-4a14-9582-b60cb204d203 - TokenCache: 26.6655901266667 minutes left until
token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:49: 0f4ffb38-6f6a-4a14-9582-b60cb204d203 - TokenCache: A matching item (access token or refresh
 token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:42:49: 0f4ffb38-6f6a-4a14-9582-b60cb204d203 - AcquireTokenHandlerBase: === Token Acquisition
finished successfully. An access token was retuned:
 Access Token Hash: juZyML/zbFjY0J5DAJE6CzDp6jmhqhy8nSpRHBfnGU8=
 Refresh Token Hash: zfz0KVwmWI2gMqk7RaRJW+DDIoq13Bv9A3nXNaf7HBo=
 Expiration Time: 10/06/2018 14:09:29 +00:00
 User Hash: S2dLw2isvT5qfkLKdn7eXudzgliZ9uLPOVsxZnHpT9s=

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/provid
ers/Microsoft.Resources/deployments/complexParametersTemplate?api-version=2017-05-10

Headers:
x-ms-client-request-id        : 516253c5-f84b-4f61-bbdc-eed3a317eee4
accept-language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
Retry-After                   : 17
x-ms-ratelimit-remaining-subscription-reads: 11998
x-ms-request-id               : 9afa9601-4c47-44d8-815a-2bf50b670e4e
x-ms-correlation-request-id   : 9afa9601-4c47-44d8-815a-2bf50b670e4e
x-ms-routing-request-id       : NORTHCENTRALUS:20181006T134249Z:9afa9601-4c47-44d8-815a-2bf50b670e4e
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Sat, 06 Oct 2018 13:42:48 GMT

Body:
{
  "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/dep
loyments/complexParametersTemplate",
  "name": "complexParametersTemplate",
  "properties": {
    "templateHash": "6287512875150736918",
    "parameters": {
      "appSku": {
        "type": "Object",
        "value": {
          "code": "f1",
          "name": "Free"
        }
      },
      "servicePlan": {
        "type": "String",
        "value": "PlanBOSpace"
      },
      "ranks": {
        "type": "Array",
        "value": [
          "a",
          "b"
        ]
      }
    },
    "mode": "Incremental",
    "provisioningState": "Running",
    "timestamp": "2018-10-06T13:42:48.4448193Z",
    "duration": "PT4.9507923S",
    "correlationId": "3b5b859c-f13f-4d23-b638-9747c052cf1f",
    "providers": [
      {
        "namespace": "Microsoft.Storage",
        "resourceTypes": [
          {
            "resourceType": "storageAccounts",
            "locations": [
              "eastus"
            ]
          }
        ]
      }
    ],
    "dependencies": []
  }
}

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:06: 8cfb5ec4-f679-40da-b11f-042d81fcece7 - AcquireTokenHandlerBase: === Token Acquisition
started:
 Authority: https://login.microsoftonline.com/d6f493b6-8cac-4ce3-ad45-59648959894e/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (2 items)
 Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:06:  - TokenCache: Deserialized 2 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:43:06: 8cfb5ec4-f679-40da-b11f-042d81fcece7 - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:06: 8cfb5ec4-f679-40da-b11f-042d81fcece7 - TokenCache: An item matching the requested resource
was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:43:06: 8cfb5ec4-f679-40da-b11f-042d81fcece7 - TokenCache: 26.3792689166667 minutes left until
token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:06: 8cfb5ec4-f679-40da-b11f-042d81fcece7 - TokenCache: A matching item (access token or refresh
 token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:06: 8cfb5ec4-f679-40da-b11f-042d81fcece7 - AcquireTokenHandlerBase: === Token Acquisition
finished successfully. An access token was retuned:
 Access Token Hash: juZyML/zbFjY0J5DAJE6CzDp6jmhqhy8nSpRHBfnGU8=
 Refresh Token Hash: zfz0KVwmWI2gMqk7RaRJW+DDIoq13Bv9A3nXNaf7HBo=
 Expiration Time: 10/06/2018 14:09:29 +00:00
 User Hash: S2dLw2isvT5qfkLKdn7eXudzgliZ9uLPOVsxZnHpT9s=

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/deploy
ments/complexParametersTemplate/operations?api-version=2017-05-10

Headers:
x-ms-client-request-id        : 37bf6237-d71e-4863-b82d-492341bded52
accept-language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11997
x-ms-request-id               : 628ef7a3-4134-4148-a6a9-4cbd3b6eb185
x-ms-correlation-request-id   : 628ef7a3-4134-4148-a6a9-4cbd3b6eb185
x-ms-routing-request-id       : NORTHCENTRALUS:20181006T134306Z:628ef7a3-4134-4148-a6a9-4cbd3b6eb185
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Sat, 06 Oct 2018 13:43:06 GMT

Body:
{
  "value": [
    {
      "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/dep
loyments/complexParametersTemplate/operations/10340A3D37B1A72D",
      "operationId": "10340A3D37B1A72D",
      "properties": {
        "provisioningOperation": "Create",
        "provisioningState": "Running",
        "timestamp": "2018-10-06T13:42:48.5565355Z",
        "duration": "PT3.9324303S",
        "trackingId": "6a38d52c-9ffc-4d81-bdd0-537b40cc541e",
        "serviceRequestId": "98a3f9fd-2d5c-4b20-b872-dd4da0cc424d",
        "statusCode": "Accepted",
        "targetResource": {
          "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Storage/stora
geAccounts/tianotest010f1a",
          "resourceType": "Microsoft.Storage/storageAccounts",
          "resourceName": "tianotest010f1a"
        }
      }
    }
  ]
}

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:06: 0529314c-e827-4a7d-aa98-87c0c6964589 - AcquireTokenHandlerBase: === Token Acquisition
started:
 Authority: https://login.microsoftonline.com/d6f493b6-8cac-4ce3-ad45-59648959894e/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (2 items)
 Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:06:  - TokenCache: Deserialized 2 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:43:06: 0529314c-e827-4a7d-aa98-87c0c6964589 - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:06: 0529314c-e827-4a7d-aa98-87c0c6964589 - TokenCache: An item matching the requested resource
was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:43:06: 0529314c-e827-4a7d-aa98-87c0c6964589 - TokenCache: 26.377245535 minutes left until token in
 cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:06: 0529314c-e827-4a7d-aa98-87c0c6964589 - TokenCache: A matching item (access token or refresh
 token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:06: 0529314c-e827-4a7d-aa98-87c0c6964589 - AcquireTokenHandlerBase: === Token Acquisition
finished successfully. An access token was retuned:
 Access Token Hash: juZyML/zbFjY0J5DAJE6CzDp6jmhqhy8nSpRHBfnGU8=
 Refresh Token Hash: zfz0KVwmWI2gMqk7RaRJW+DDIoq13Bv9A3nXNaf7HBo=
 Expiration Time: 10/06/2018 14:09:29 +00:00
 User Hash: S2dLw2isvT5qfkLKdn7eXudzgliZ9uLPOVsxZnHpT9s=

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/provid
ers/Microsoft.Resources/deployments/complexParametersTemplate?api-version=2017-05-10

Headers:
x-ms-client-request-id        : d87b3885-9d70-4912-823a-22f669deeb14
accept-language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
Retry-After                   : 5
x-ms-ratelimit-remaining-subscription-reads: 11996
x-ms-request-id               : 13a0bb6d-2798-44fe-970b-fff36d6e2e62
x-ms-correlation-request-id   : 13a0bb6d-2798-44fe-970b-fff36d6e2e62
x-ms-routing-request-id       : NORTHCENTRALUS:20181006T134306Z:13a0bb6d-2798-44fe-970b-fff36d6e2e62
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Sat, 06 Oct 2018 13:43:06 GMT

Body:
{
  "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/dep
loyments/complexParametersTemplate",
  "name": "complexParametersTemplate",
  "properties": {
    "templateHash": "6287512875150736918",
    "parameters": {
      "appSku": {
        "type": "Object",
        "value": {
          "code": "f1",
          "name": "Free"
        }
      },
      "servicePlan": {
        "type": "String",
        "value": "PlanBOSpace"
      },
      "ranks": {
        "type": "Array",
        "value": [
          "a",
          "b"
        ]
      }
    },
    "mode": "Incremental",
    "provisioningState": "Running",
    "timestamp": "2018-10-06T13:42:48.4448193Z",
    "duration": "PT4.9507923S",
    "correlationId": "3b5b859c-f13f-4d23-b638-9747c052cf1f",
    "providers": [
      {
        "namespace": "Microsoft.Storage",
        "resourceTypes": [
          {
            "resourceType": "storageAccounts",
            "locations": [
              "eastus"
            ]
          }
        ]
      }
    ],
    "dependencies": []
  }
}

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:11: 5970ed83-be61-4193-86ca-21df7a3ef960 - AcquireTokenHandlerBase: === Token Acquisition
started:
 Authority: https://login.microsoftonline.com/d6f493b6-8cac-4ce3-ad45-59648959894e/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (2 items)
 Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:11:  - TokenCache: Deserialized 2 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:43:11: 5970ed83-be61-4193-86ca-21df7a3ef960 - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:11: 5970ed83-be61-4193-86ca-21df7a3ef960 - TokenCache: An item matching the requested resource
was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:43:11: 5970ed83-be61-4193-86ca-21df7a3ef960 - TokenCache: 26.2908258033333 minutes left until
token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:11: 5970ed83-be61-4193-86ca-21df7a3ef960 - TokenCache: A matching item (access token or refresh
 token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:11: 5970ed83-be61-4193-86ca-21df7a3ef960 - AcquireTokenHandlerBase: === Token Acquisition
finished successfully. An access token was retuned:
 Access Token Hash: juZyML/zbFjY0J5DAJE6CzDp6jmhqhy8nSpRHBfnGU8=
 Refresh Token Hash: zfz0KVwmWI2gMqk7RaRJW+DDIoq13Bv9A3nXNaf7HBo=
 Expiration Time: 10/06/2018 14:09:29 +00:00
 User Hash: S2dLw2isvT5qfkLKdn7eXudzgliZ9uLPOVsxZnHpT9s=

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/deploy
ments/complexParametersTemplate/operations?api-version=2017-05-10

Headers:
x-ms-client-request-id        : 4adf3c87-98a1-4aad-bddc-20e0ddd5f4cb
accept-language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11995
x-ms-request-id               : d39553e5-6a7d-4e16-8212-cab9f09169de
x-ms-correlation-request-id   : d39553e5-6a7d-4e16-8212-cab9f09169de
x-ms-routing-request-id       : NORTHCENTRALUS:20181006T134312Z:d39553e5-6a7d-4e16-8212-cab9f09169de
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Sat, 06 Oct 2018 13:43:11 GMT

Body:
{
  "value": [
    {
      "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/dep
loyments/complexParametersTemplate/operations/10340A3D37B1A72D",
      "operationId": "10340A3D37B1A72D",
      "properties": {
        "provisioningOperation": "Create",
        "provisioningState": "Running",
        "timestamp": "2018-10-06T13:43:10.5054095Z",
        "duration": "PT25.8813043S",
        "trackingId": "10bd5cd8-c018-4726-b89e-858df4a9cf88",
        "serviceRequestId": "98a3f9fd-2d5c-4b20-b872-dd4da0cc424d",
        "statusCode": "OK",
        "targetResource": {
          "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Storage/stora
geAccounts/tianotest010f1a",
          "resourceType": "Microsoft.Storage/storageAccounts",
          "resourceName": "tianotest010f1a"
        }
      }
    }
  ]
}

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:11: 360f94de-b2ad-41eb-bd63-15d04b4f1bf4 - AcquireTokenHandlerBase: === Token Acquisition
started:
 Authority: https://login.microsoftonline.com/d6f493b6-8cac-4ce3-ad45-59648959894e/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (2 items)
 Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:11:  - TokenCache: Deserialized 2 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:43:11: 360f94de-b2ad-41eb-bd63-15d04b4f1bf4 - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:11: 360f94de-b2ad-41eb-bd63-15d04b4f1bf4 - TokenCache: An item matching the requested resource
was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:43:11: 360f94de-b2ad-41eb-bd63-15d04b4f1bf4 - TokenCache: 26.2886268316667 minutes left until
token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:11: 360f94de-b2ad-41eb-bd63-15d04b4f1bf4 - TokenCache: A matching item (access token or refresh
 token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:11: 360f94de-b2ad-41eb-bd63-15d04b4f1bf4 - AcquireTokenHandlerBase: === Token Acquisition
finished successfully. An access token was retuned:
 Access Token Hash: juZyML/zbFjY0J5DAJE6CzDp6jmhqhy8nSpRHBfnGU8=
 Refresh Token Hash: zfz0KVwmWI2gMqk7RaRJW+DDIoq13Bv9A3nXNaf7HBo=
 Expiration Time: 10/06/2018 14:09:29 +00:00
 User Hash: S2dLw2isvT5qfkLKdn7eXudzgliZ9uLPOVsxZnHpT9s=

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/provid
ers/Microsoft.Resources/deployments/complexParametersTemplate?api-version=2017-05-10

Headers:
x-ms-client-request-id        : ef8efb00-b6c7-4d0f-8d0e-b4339b1eb039
accept-language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
Retry-After                   : 5
x-ms-ratelimit-remaining-subscription-reads: 11994
x-ms-request-id               : afedfd8a-8e89-4927-96f5-b7c37c61d265
x-ms-correlation-request-id   : afedfd8a-8e89-4927-96f5-b7c37c61d265
x-ms-routing-request-id       : NORTHCENTRALUS:20181006T134312Z:afedfd8a-8e89-4927-96f5-b7c37c61d265
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Sat, 06 Oct 2018 13:43:11 GMT

Body:
{
  "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/dep
loyments/complexParametersTemplate",
  "name": "complexParametersTemplate",
  "properties": {
    "templateHash": "6287512875150736918",
    "parameters": {
      "appSku": {
        "type": "Object",
        "value": {
          "code": "f1",
          "name": "Free"
        }
      },
      "servicePlan": {
        "type": "String",
        "value": "PlanBOSpace"
      },
      "ranks": {
        "type": "Array",
        "value": [
          "a",
          "b"
        ]
      }
    },
    "mode": "Incremental",
    "provisioningState": "Running",
    "timestamp": "2018-10-06T13:43:07.3695652Z",
    "duration": "PT23.8755382S",
    "correlationId": "3b5b859c-f13f-4d23-b638-9747c052cf1f",
    "providers": [
      {
        "namespace": "Microsoft.Storage",
        "resourceTypes": [
          {
            "resourceType": "storageAccounts",
            "locations": [
              "eastus"
            ]
          }
        ]
      }
    ],
    "dependencies": []
  }
}

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:17: 768c0945-0109-4416-888c-4c15a5ed92c5 - AcquireTokenHandlerBase: === Token Acquisition
started:
 Authority: https://login.microsoftonline.com/d6f493b6-8cac-4ce3-ad45-59648959894e/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (2 items)
 Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:17:  - TokenCache: Deserialized 2 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:43:17: 768c0945-0109-4416-888c-4c15a5ed92c5 - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:17: 768c0945-0109-4416-888c-4c15a5ed92c5 - TokenCache: An item matching the requested resource
was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:43:17: 768c0945-0109-4416-888c-4c15a5ed92c5 - TokenCache: 26.2018193466667 minutes left until
token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:17: 768c0945-0109-4416-888c-4c15a5ed92c5 - TokenCache: A matching item (access token or refresh
 token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:17: 768c0945-0109-4416-888c-4c15a5ed92c5 - AcquireTokenHandlerBase: === Token Acquisition
finished successfully. An access token was retuned:
 Access Token Hash: juZyML/zbFjY0J5DAJE6CzDp6jmhqhy8nSpRHBfnGU8=
 Refresh Token Hash: zfz0KVwmWI2gMqk7RaRJW+DDIoq13Bv9A3nXNaf7HBo=
 Expiration Time: 10/06/2018 14:09:29 +00:00
 User Hash: S2dLw2isvT5qfkLKdn7eXudzgliZ9uLPOVsxZnHpT9s=

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/deploy
ments/complexParametersTemplate/operations?api-version=2017-05-10

Headers:
x-ms-client-request-id        : 2270a5b4-3f91-4a76-a30f-704346e4ceed
accept-language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11993
x-ms-request-id               : ce2eea7d-9881-4480-82db-bf5759de7f76
x-ms-correlation-request-id   : ce2eea7d-9881-4480-82db-bf5759de7f76
x-ms-routing-request-id       : NORTHCENTRALUS:20181006T134317Z:ce2eea7d-9881-4480-82db-bf5759de7f76
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Sat, 06 Oct 2018 13:43:16 GMT

Body:
{
  "value": [
    {
      "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/dep
loyments/complexParametersTemplate/operations/10340A3D37B1A72D",
      "operationId": "10340A3D37B1A72D",
      "properties": {
        "provisioningOperation": "Create",
        "provisioningState": "Succeeded",
        "timestamp": "2018-10-06T13:43:15.9556499Z",
        "duration": "PT31.3315447S",
        "trackingId": "690aba5f-ba04-4da7-b482-dfd594a8c4ea",
        "serviceRequestId": "98a3f9fd-2d5c-4b20-b872-dd4da0cc424d",
        "statusCode": "OK",
        "targetResource": {
          "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Storage/stora
geAccounts/tianotest010f1a",
          "resourceType": "Microsoft.Storage/storageAccounts",
          "resourceName": "tianotest010f1a"
        }
      }
    }
  ]
}

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:17: 8e4f305a-f0fc-48ab-a7ef-f9ce1a028659 - AcquireTokenHandlerBase: === Token Acquisition
started:
 Authority: https://login.microsoftonline.com/d6f493b6-8cac-4ce3-ad45-59648959894e/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (2 items)
 Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:17:  - TokenCache: Deserialized 2 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:43:17: 8e4f305a-f0fc-48ab-a7ef-f9ce1a028659 - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:17: 8e4f305a-f0fc-48ab-a7ef-f9ce1a028659 - TokenCache: An item matching the requested resource
was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:43:17: 8e4f305a-f0fc-48ab-a7ef-f9ce1a028659 - TokenCache: 26.199394545 minutes left until token in
 cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:17: 8e4f305a-f0fc-48ab-a7ef-f9ce1a028659 - TokenCache: A matching item (access token or refresh
 token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:17: 8e4f305a-f0fc-48ab-a7ef-f9ce1a028659 - AcquireTokenHandlerBase: === Token Acquisition
finished successfully. An access token was retuned:
 Access Token Hash: juZyML/zbFjY0J5DAJE6CzDp6jmhqhy8nSpRHBfnGU8=
 Refresh Token Hash: zfz0KVwmWI2gMqk7RaRJW+DDIoq13Bv9A3nXNaf7HBo=
 Expiration Time: 10/06/2018 14:09:29 +00:00
 User Hash: S2dLw2isvT5qfkLKdn7eXudzgliZ9uLPOVsxZnHpT9s=

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/provid
ers/Microsoft.Resources/deployments/complexParametersTemplate?api-version=2017-05-10

Headers:
x-ms-client-request-id        : 8d5ff630-9ef5-466a-8f4a-47e749bf9e33
accept-language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
Retry-After                   : 5
x-ms-ratelimit-remaining-subscription-reads: 11992
x-ms-request-id               : 32f21c4f-e74c-4e6c-bfda-c3f74e08c3c1
x-ms-correlation-request-id   : 32f21c4f-e74c-4e6c-bfda-c3f74e08c3c1
x-ms-routing-request-id       : NORTHCENTRALUS:20181006T134317Z:32f21c4f-e74c-4e6c-bfda-c3f74e08c3c1
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Sat, 06 Oct 2018 13:43:16 GMT

Body:
{
  "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/dep
loyments/complexParametersTemplate",
  "name": "complexParametersTemplate",
  "properties": {
    "templateHash": "6287512875150736918",
    "parameters": {
      "appSku": {
        "type": "Object",
        "value": {
          "code": "f1",
          "name": "Free"
        }
      },
      "servicePlan": {
        "type": "String",
        "value": "PlanBOSpace"
      },
      "ranks": {
        "type": "Array",
        "value": [
          "a",
          "b"
        ]
      }
    },
    "mode": "Incremental",
    "provisioningState": "Running",
    "timestamp": "2018-10-06T13:43:07.3695652Z",
    "duration": "PT23.8755382S",
    "correlationId": "3b5b859c-f13f-4d23-b638-9747c052cf1f",
    "providers": [
      {
        "namespace": "Microsoft.Storage",
        "resourceTypes": [
          {
            "resourceType": "storageAccounts",
            "locations": [
              "eastus"
            ]
          }
        ]
      }
    ],
    "dependencies": []
  }
}

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:22: 4647a967-dbde-4e43-be1d-0554307f8727 - AcquireTokenHandlerBase: === Token Acquisition
started:
 Authority: https://login.microsoftonline.com/d6f493b6-8cac-4ce3-ad45-59648959894e/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (2 items)
 Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:22:  - TokenCache: Deserialized 2 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:43:22: 4647a967-dbde-4e43-be1d-0554307f8727 - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:22: 4647a967-dbde-4e43-be1d-0554307f8727 - TokenCache: An item matching the requested resource
was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:43:22: 4647a967-dbde-4e43-be1d-0554307f8727 - TokenCache: 26.1137072966667 minutes left until
token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:22: 4647a967-dbde-4e43-be1d-0554307f8727 - TokenCache: A matching item (access token or refresh
 token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:22: 4647a967-dbde-4e43-be1d-0554307f8727 - AcquireTokenHandlerBase: === Token Acquisition
finished successfully. An access token was retuned:
 Access Token Hash: juZyML/zbFjY0J5DAJE6CzDp6jmhqhy8nSpRHBfnGU8=
 Refresh Token Hash: zfz0KVwmWI2gMqk7RaRJW+DDIoq13Bv9A3nXNaf7HBo=
 Expiration Time: 10/06/2018 14:09:29 +00:00
 User Hash: S2dLw2isvT5qfkLKdn7eXudzgliZ9uLPOVsxZnHpT9s=

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/deploy
ments/complexParametersTemplate/operations?api-version=2017-05-10

Headers:
x-ms-client-request-id        : 54e4f5bd-5bfc-465e-81c8-e241a18d3491
accept-language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11991
x-ms-request-id               : a08d55c6-1ed7-43fa-b809-ebaa7f6534f2
x-ms-correlation-request-id   : a08d55c6-1ed7-43fa-b809-ebaa7f6534f2
x-ms-routing-request-id       : NORTHCENTRALUS:20181006T134322Z:a08d55c6-1ed7-43fa-b809-ebaa7f6534f2
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Sat, 06 Oct 2018 13:43:21 GMT

Body:
{
  "value": [
    {
      "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/dep
loyments/complexParametersTemplate/operations/10340A3D37B1A72D",
      "operationId": "10340A3D37B1A72D",
      "properties": {
        "provisioningOperation": "Create",
        "provisioningState": "Succeeded",
        "timestamp": "2018-10-06T13:43:15.9556499Z",
        "duration": "PT31.3315447S",
        "trackingId": "690aba5f-ba04-4da7-b482-dfd594a8c4ea",
        "serviceRequestId": "98a3f9fd-2d5c-4b20-b872-dd4da0cc424d",
        "statusCode": "OK",
        "targetResource": {
          "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Storage/stora
geAccounts/tianotest010f1a",
          "resourceType": "Microsoft.Storage/storageAccounts",
          "resourceName": "tianotest010f1a"
        }
      }
    },
    {
      "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/dep
loyments/complexParametersTemplate/operations/08586627735219835874",
      "operationId": "08586627735219835874",
      "properties": {
        "provisioningOperation": "EvaluateDeploymentOutput",
        "provisioningState": "Succeeded",
        "timestamp": "2018-10-06T13:43:19.9080356Z",
        "duration": "PT3.9106315S",
        "trackingId": "eaf2a0e9-16c4-453d-ac8d-3985e60508f6",
        "statusCode": "OK",
        "statusMessage": null
      }
    }
  ]
}

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:22: 5900b02b-6c72-4156-8f29-0a068863c319 - AcquireTokenHandlerBase: === Token Acquisition
started:
 Authority: https://login.microsoftonline.com/d6f493b6-8cac-4ce3-ad45-59648959894e/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (2 items)
 Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:22:  - TokenCache: Deserialized 2 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:43:22: 5900b02b-6c72-4156-8f29-0a068863c319 - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:22: 5900b02b-6c72-4156-8f29-0a068863c319 - TokenCache: An item matching the requested resource
was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:43:22: 5900b02b-6c72-4156-8f29-0a068863c319 - TokenCache: 26.1113539466667 minutes left until
token in cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:22: 5900b02b-6c72-4156-8f29-0a068863c319 - TokenCache: A matching item (access token or refresh
 token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:43:22: 5900b02b-6c72-4156-8f29-0a068863c319 - AcquireTokenHandlerBase: === Token Acquisition
finished successfully. An access token was retuned:
 Access Token Hash: juZyML/zbFjY0J5DAJE6CzDp6jmhqhy8nSpRHBfnGU8=
 Refresh Token Hash: zfz0KVwmWI2gMqk7RaRJW+DDIoq13Bv9A3nXNaf7HBo=
 Expiration Time: 10/06/2018 14:09:29 +00:00
 User Hash: S2dLw2isvT5qfkLKdn7eXudzgliZ9uLPOVsxZnHpT9s=

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/provid
ers/Microsoft.Resources/deployments/complexParametersTemplate?api-version=2017-05-10

Headers:
x-ms-client-request-id        : f37d1114-1161-47fa-a323-ed4365e10838
accept-language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11990
x-ms-request-id               : 28a66661-d2e9-4a6b-aa2a-2ec3b06310fa
x-ms-correlation-request-id   : 28a66661-d2e9-4a6b-aa2a-2ec3b06310fa
x-ms-routing-request-id       : NORTHCENTRALUS:20181006T134322Z:28a66661-d2e9-4a6b-aa2a-2ec3b06310fa
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Sat, 06 Oct 2018 13:43:21 GMT

Body:
{
  "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/dep
loyments/complexParametersTemplate",
  "name": "complexParametersTemplate",
  "properties": {
    "templateHash": "6287512875150736918",
    "parameters": {
      "appSku": {
        "type": "Object",
        "value": {
          "code": "f1",
          "name": "Free"
        }
      },
      "servicePlan": {
        "type": "String",
        "value": "PlanBOSpace"
      },
      "ranks": {
        "type": "Array",
        "value": [
          "a",
          "b"
        ]
      }
    },
    "mode": "Incremental",
    "provisioningState": "Succeeded",
    "timestamp": "2018-10-06T13:43:19.9423621Z",
    "duration": "PT36.4483351S",
    "correlationId": "3b5b859c-f13f-4d23-b638-9747c052cf1f",
    "providers": [
      {
        "namespace": "Microsoft.Storage",
        "resourceTypes": [
          {
            "resourceType": "storageAccounts",
            "locations": [
              "eastus"
            ]
          }
        ]
      }
    ],
    "dependencies": [],
    "outputs": {},
    "outputResources": [
      {
        "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Storage/stora
geAccounts/tianotest010f1a"
      }
    ]
  }
}

DEBUG: AzureQoSEvent: CommandName - New-AzureRmResourceGroupDeployment; IsSuccess - True; Duration - 00:00:42.3890641;
Exception - ;
DEBUG: Finish sending metric.
DEBUG: 8:43:23 AM - NewAzureResourceGroupDeploymentCmdlet end processing.
DEBUG: 8:43:23 AM - NewAzureResourceGroupDeploymentCmdlet end processing.
PS C:\src\github> # 4. Verify that the output parameters match the input.
>> # The deployment variable here is the same as above.
>> $workaround = $false
>> $deployment = Get-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroupName
>> foreach ($parameter in $deployment.Parameters.Keys) {
>>     $deploymentParameterValue = $deployment.Parameters.$parameter.Value
>>     # This workaround requires PowerShell Core 6.1
>>     if (($workaround) -and ($deployment.Parameters.$parameter.Type -eq "Object")) {
>>         Write-Verbose "Comparing an object."
>>         $deploymentParameterValue = ($deployment.Parameters.$parameter.Value.ToString() | ConvertFrom-Json -AsHashtab
le)
>>     }
>>     # This workaround works with PowerShell 5.1
>>     if (($workaround) -and ($deployment.Parameters.$parameter.Type -eq "Array")) {
>>         Write-Verbose "Comparing an array."
>>         $deploymentParameterValue = ($deployment.Parameters.$parameter.Value.ToString() | ConvertFrom-Json)
>>     }
>>     $objectComparisonResult = Compare-Object -ReferenceObject $templateParameters.$parameter -DifferenceObject $deplo
ymentParameterValue
>>     if ($null -eq $objectComparisonResult) {
>>         Write-Host ("Matched: {0} {1} {2}" -f $parameter, $deployment.Parameters.$parameter.Type, $deployment.Paramet
ers.$parameter.Value)
>>     } else {
>>         Write-Host "Failed!!"
>>         $objectComparisonResult
>>     }
>> }
>>
DEBUG: 8:44:12 AM - GetAzureResourceGroupDeploymentCmdlet begin processing with ParameterSet
'GetByResourceGroupDeploymentName'.
DEBUG: 8:44:12 AM - using account id 'user@domain.com'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'user@domain.com', environment:
'AzureCloud', tenant: 'd6f493b6-8cac-4ce3-ad45-59648959894e'
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:44:12: 84569302-611f-47fe-9733-14fcd5cf9e6d - AcquireTokenHandlerBase: === Token Acquisition
started:
 Authority: https://login.microsoftonline.com/d6f493b6-8cac-4ce3-ad45-59648959894e/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (2 items)
 Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:44:12:  - TokenCache: Deserialized 2 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:44:12: 84569302-611f-47fe-9733-14fcd5cf9e6d - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:44:12: 84569302-611f-47fe-9733-14fcd5cf9e6d - TokenCache: An item matching the requested resource
was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:44:12: 84569302-611f-47fe-9733-14fcd5cf9e6d - TokenCache: 25.277367985 minutes left until token in
 cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:44:12: 84569302-611f-47fe-9733-14fcd5cf9e6d - TokenCache: A matching item (access token or refresh
 token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:44:12: 84569302-611f-47fe-9733-14fcd5cf9e6d - AcquireTokenHandlerBase: === Token Acquisition
finished successfully. An access token was retuned:
 Access Token Hash: juZyML/zbFjY0J5DAJE6CzDp6jmhqhy8nSpRHBfnGU8=
 Refresh Token Hash: zfz0KVwmWI2gMqk7RaRJW+DDIoq13Bv9A3nXNaf7HBo=
 Expiration Time: 10/06/2018 14:09:29 +00:00
 User Hash: S2dLw2isvT5qfkLKdn7eXudzgliZ9uLPOVsxZnHpT9s=

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:44:12: 46972bb3-83e2-430c-8d4b-0c1e9d10e940 - AcquireTokenHandlerBase: === Token Acquisition
started:
 Authority: https://login.microsoftonline.com/d6f493b6-8cac-4ce3-ad45-59648959894e/
 Resource: https://management.core.windows.net/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: Microsoft.Azure.Commands.Common.Authentication.ProtectedFileTokenCache (2 items)
 Authentication Target: User

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:44:12:  - TokenCache: Deserialized 2 items to token cache.
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:44:12: 46972bb3-83e2-430c-8d4b-0c1e9d10e940 - TokenCache: Looking up cache for a token...
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:44:12: 46972bb3-83e2-430c-8d4b-0c1e9d10e940 - TokenCache: An item matching the requested resource
was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 :
DEBUG: 10/06/2018 13:44:12: 46972bb3-83e2-430c-8d4b-0c1e9d10e940 - TokenCache: 25.277313375 minutes left until token in
 cache expires
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:44:12: 46972bb3-83e2-430c-8d4b-0c1e9d10e940 - TokenCache: A matching item (access token or refresh
 token or both) was found in the cache
DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 :
DEBUG: 10/06/2018 13:44:12: 46972bb3-83e2-430c-8d4b-0c1e9d10e940 - AcquireTokenHandlerBase: === Token Acquisition
finished successfully. An access token was retuned:
 Access Token Hash: juZyML/zbFjY0J5DAJE6CzDp6jmhqhy8nSpRHBfnGU8=
 Refresh Token Hash: zfz0KVwmWI2gMqk7RaRJW+DDIoq13Bv9A3nXNaf7HBo=
 Expiration Time: 10/06/2018 14:09:29 +00:00
 User Hash: S2dLw2isvT5qfkLKdn7eXudzgliZ9uLPOVsxZnHpT9s=

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourcegroups/deploymentTest-rg/provid
ers/Microsoft.Resources/deployments/?api-version=2017-05-10

Headers:
x-ms-client-request-id        : 0f293442-116c-4bc9-aff5-ab07d700b245
accept-language               : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma                        : no-cache
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-request-id               : 32d11801-9d90-434d-aead-1b5bc025218f
x-ms-correlation-request-id   : 32d11801-9d90-434d-aead-1b5bc025218f
x-ms-routing-request-id       : NORTHCENTRALUS:20181006T134413Z:32d11801-9d90-434d-aead-1b5bc025218f
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
Cache-Control                 : no-cache
Date                          : Sat, 06 Oct 2018 13:44:12 GMT

Body:
{
  "value": [
    {
      "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Resources/dep
loyments/complexParametersTemplate",
      "name": "complexParametersTemplate",
      "properties": {
        "templateHash": "6287512875150736918",
        "parameters": {
          "appSku": {
            "type": "Object",
            "value": {
              "code": "f1",
              "name": "Free"
            }
          },
          "servicePlan": {
            "type": "String",
            "value": "PlanBOSpace"
          },
          "ranks": {
            "type": "Array",
            "value": [
              "a",
              "b"
            ]
          }
        },
        "mode": "Incremental",
        "provisioningState": "Succeeded",
        "timestamp": "2018-10-06T13:43:19.9423621Z",
        "duration": "PT36.4483351S",
        "correlationId": "3b5b859c-f13f-4d23-b638-9747c052cf1f",
        "providers": [
          {
            "namespace": "Microsoft.Storage",
            "resourceTypes": [
              {
                "resourceType": "storageAccounts",
                "locations": [
                  "eastus"
                ]
              }
            ]
          }
        ],
        "dependencies": [],
        "outputs": {},
        "outputResources": [
          {
            "id":
"/subscriptions/27188119-aa7b-45f4-ae3e-80d26b077cb9/resourceGroups/deploymentTest-rg/providers/Microsoft.Storage/stora
geAccounts/tianotest010f1a"
          }
        ]
      }
    }
  ]
}

DEBUG: AzureQoSEvent: CommandName - Get-AzureRmResourceGroupDeployment; IsSuccess - True; Duration - 00:00:00.4543551;
Exception - ;
DEBUG: Finish sending metric.
DEBUG: 8:44:13 AM - GetAzureResourceGroupDeploymentCmdlet end processing.
DEBUG: 8:44:13 AM - GetAzureResourceGroupDeploymentCmdlet end processing.
Failed!!

Matched: servicePlan String PlanBOSpace
Failed!!
InputObject  SideIndicator
-----------  -------------
{}           =>
{}           =>
{code, name} <=
{}           =>
{}           =>
a            <=
b            <=

PS C:\src\github>
markcowl commented 5 years ago

@Tiano2017 Can you take a look?

ignatz42 commented 5 years ago

@Tiano2017 Is anymore information needed to help identify the source of the problem?

kutluomeroglu commented 5 years ago

This issue is still relevant to new (Get|New)-AzResourceGroupDeployment, and it is an issue when you are linking multiple deployments / arm templates together with Az powershell modules.

This issue blocks you from passing arrays from an output of an ARM template as an input to another ARM template.

The version I am using:

CommandType     Name                                               Version    Source                                                                                                   
-----------     ----                                               -------    ------                                                                                                   
Cmdlet          New-AzDeployment                                   1.4.0      Az.Resources