Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.22k stars 3.83k forks source link

New-AzureRmResourceGroupDeployment - Fails for Notification Hub after upgrading to AzurePowershell 5.0.1 #5082

Open rajaprad opened 6 years ago

rajaprad commented 6 years ago

Cmdlet(s)

New-AzureRmResourceGroupDeployment

PowerShell Version

5.1.14409.1012

Module Version

5.0.1

OS Version

10.0.14409.1012

Description

Notification Hub Deployment - Along with googleApiKey and apnsCertificate fails after upgrade to Azure Powershell 5.0.1 Deployment with the same template passes with 4.4.1. Have not tried with 5.0.0

Debug Output

New-AzureRmResourceGroupDeployment -Name pradebban -ResourceGroupName pradebban -TemplateParameterFile "NotificationHub_Param.json" -TemplateFile "NotificationHub_Deploy.json" -Debug

DEBUG: 6:53:43 PM - NewAzureResourceGroupDeploymentCmdlet begin processing with ParameterSet 'ByTemplateFileAndParameterFile'.

Confirm Continue with this operation? [Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): A DEBUG: 6:53:45 PM - using account id '-*****.*'...

Confirm Are you sure you want to perform this action? Performing the operation "Creating Deployment" on target "pradebbanrm". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): A DEBUG: [Common.Authentication]: Authenticating using Account: '-*****.*', environment: 'AzureCloud', tenant: '-*****.*' DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 12/05/2017 18:53:46: -*****.* - AcquireTokenHandlerBase: === Token Acquisition started: Authority: https://login.microsoftonline.com/-*****.*/ Resource: https://management.core.windows.net/ ClientId: -*****.* CacheType: Microsoft.Azure.Commands.Common.Authentication.AuthenticationStoreTokenCache (1 items) Authentication Target: Client

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 : DEBUG: 12/05/2017 18:53:46: -*****.* - TokenCache: Looking up cache for a token... DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 12/05/2017 18:53:46: -*****.* - TokenCache: An item matching the requested resource was found in the cache DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Verbose: 1 : DEBUG: 12/05/2017 18:53:46: -*****.* - TokenCache: 43.7648895283333 minutes left until token in cache expires DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 12/05/2017 18:53:46: -*****.* - TokenCache: A matching item (access token or refresh token or both) was found in the cache DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 12/05/2017 18:53:46: -*****.* - AcquireTokenHandlerBase: === Token Acquisition finished successfully. An access token was retuned: Access Token Hash: -*****.*ijqiOtjPlY= Refresh Token Hash: [No Refresh Token] Expiration Time: 12/05/2017 19:37:31 +00:00 User Hash: null

DEBUG: Microsoft.IdentityModel.Clients.ActiveDirectory Information: 2 : DEBUG: 12/05/2017 18:53:46: - TokenCache: Serializing token cache with 1 items. DEBUG: ============================ HTTP REQUEST ============================

HTTP Method: POST

Absolute Uri: https://management.azure.com/subscriptions/****-*********.*****/resourcegroups/pradebbanrm/providers/Micros oft.Resources/deployments/pradebban/validate?api-version=2017-05-10

Headers: x-ms-client-request-id : f5c40b72-bac1-4f8a-9276-5eaaf84337cd accept-language : en-US

Body: { "properties": { "template": { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "NamespaceName": { "type": "string", "minLength": 4, "maxLength": 20, "metadata": { "description": "Name of the NotificationHub Namespace." } }, "NotificationHubSKU": { "type": "string", "allowedValues": [ "Free", "Standard", "Premium" ], "metadata": { "description": "The Scale tier of NotificationHub." } }, "NotificationhubName": { "type": "string", "minLength": 5, "maxLength": 50, "metadata": { "description": "Name of the Notificationhub" } }, "googleApiKey": { "type": "string", "metadata": { "description": "Google API key for authenticating with GCM" } }, "apnsCertificate": { "type": "string", "metadata": { "description": "A certificate (in base 64 format) provided by Apple on the iOS Provisioning Portal" } }, "certificateKey": { "type": "string", "metadata": { "description": "The Certificate Key provided by the iOS Provisioning Portal when registering the application" } }, "Environment": { "type": "string", "metadata": { "description": "Environment Tag" } } }, "variables": { "location": "[resourceGroup().location]" }, "resources": [ { "type": "Microsoft.NotificationHubs/namespaces", "sku": { "name": "[parameters('NotificationHubSKU')]" }, "kind": "NotificationHub", "name": "[parameters('NamespaceName')]", "apiVersion": "2017-04-01", "location": "[variables('location')]", "scale": null, "properties": { "namespaceType": "NotificationHub" }, "tags": { "Environment": "[parameters('Environment')]" } }, { "type": "Microsoft.NotificationHubs/namespaces/notificationHubs", "name": "[parameters('NotificationhubName')]", "apiVersion": "2017-04-01", "location": "[variables('location')]", "scale": null, "properties": { "gcmCredential": { "properties": { "googleApiKey": "[parameters('googleApiKey')]" } }, "apnsCredential": { "properties": { "apnsCertificate": "[parameters('apnsCertificate')]", "certificateKey": "[parameters('certificateKey')]" } } }, "tags": { "Environment": "[parameters('Environment')]" }, "dependsOn": [ "[resourceId('Microsoft.NotificationHubs/namespaces', parameters('NamespaceName'))]" ] } ] }, "parameters": { "googleApiKey": { "value": "B5SPeCU5AOoPCc" }, "certificateKey": { "value": "summa2017" }, "NamespaceName": { "value": "pradebban" }, "apnsCertificate": { "value": "MIINEQIBAzCCDNgGCSqGSIb3DQEHAaCCDMkEggzFMIIMwTCCBzcGCSqGSIb3DQEHBqCCBygwggckAgEAMIIHHQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIm1Wr " }, "Environment": { "value": "PRADEBBAN" }, "NotificationhubName": { "value": "pradebban/notificationhub" }, "NotificationHubSKU": { "value": "Free" } }, "mode": "Incremental" } }

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

Status Code: OK

Headers: Pragma : no-cache x-ms-ratelimit-remaining-subscription-writes: 1199 x-ms-request-id : -*****.* x-ms-correlation-request-id : -*****.* x-ms-routing-request-id : EASTUS:20171205T185347Z:-*****.* Strict-Transport-Security : max-age=31536000; includeSubDomains Cache-Control : no-cache Date : Tue, 05 Dec 2017 18:53:46 GMT

Body: { "id": "/subscriptions/-*****.*/resourceGroups/pradebbanrm/providers/Microsoft.Resources/deployments/p radebban", "name": "pradebban", "properties": { "templateHash": "1656987424290092262", "parameters": { "namespaceName": { "type": "String", "value": "pradebban" }, "notificationHubSKU": { "type": "String", "value": "Free" }, "notificationhubName": { "type": "String", "value": "pradebban/notificationhub" }, "googleApiKey": { "type": "String", "value": "CU5AELpztbHvxL818OoPCc" }, "apnsCertificate": { "type": "String", "value": "MIINEQIBAzCCDNgGCSqGSIb3DQEHAaCCDMkEggzFMIIMwTCCBzcGCSqGSIb3DQEHBqCCBygwggckAgEAMIIHHQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIm1Wr EeBGXZfDdZr28L5PFcoyQQqP0wza4AYnxb92RYjpXucP8pD/7Y8k76LsZ7+D+o18ziNXSuyzEzTUEY9Upf9aTHmJ0ZTsiiEIHO/ILxnee32KyEFUlBhHqc3pgFUW" }, "certificateKey": { "type": "String", "value": "summa2017" }, "environment": { "type": "String", "value": "PRADEBBAN" } }, "mode": "Incremental", "provisioningState": "Succeeded", "timestamp": "2017-12-05T18:53:47.2524422Z", "duration": "PT0S", "correlationId": "243-4006-95ba-6eb9b367b4a8", "providers": [ { "namespace": "Microsoft.NotificationHubs", "resourceTypes": [ { "resourceType": "namespaces", "locations": [ "eastus" ] }, { "resourceType": "namespaces/notificationHubs", "locations": [ "eastus" ] } ] } ], "dependencies": [ { "dependsOn": [ { "id": "/subscriptions/-*****.*/resourceGroups/pradebbanrm/providers/Microsoft.NotificationHubs/namesp aces/pradebban", "resourceType": "Microsoft.NotificationHubs/namespaces", "resourceName": "pradebban" } ], "id": "/subscriptions/-*****.*/resourceGroups/pradebbanrm/providers/Microsoft.NotificationHubs/namesp aces/pradebban/notificationHubs/notificationhub", "resourceType": "Microsoft.NotificationHubs/namespaces/notificationHubs", "resourceName": "pradebban/notificationhub" } ], "validatedResources": [ { "apiVersion": "2017-04-01", "id": "/subscriptions/-*****.*/resourceGroups/pradebbanrm/providers/Microsoft.NotificationHubs/namesp aces/pradebban", "name": "pradebban", "type": "Microsoft.NotificationHubs/namespaces", "sku": { "name": "Free" }, "kind": "NotificationHub", "location": "eastus", "tags": { "Environment": "PRADEBBAN" }, "properties": { "namespaceType": "NotificationHub" } }, { "dependsOn": [

"/subscriptions/-*****.*/resourceGroups/pradebbanrm/providers/Microsoft.NotificationHubs/namesp aces/pradebban" ], "apiVersion": "2017-04-01", "id": "/subscriptions/-*****.*/resourceGroups/pradebbanrm/providers/Microsoft.NotificationHubs/namesp aces/pradebban/notificationHubs/notificationhub", "name": "pradebban/notificationhub", "type": "Microsoft.NotificationHubs/namespaces/notificationHubs", "location": "eastus", "tags": { "Environment": "PRADEBBAN" }, "properties": { "gcmCredential": { "properties": { "googleApiKey": "5SPeCU5AECc" } }, "apnsCredential": { "properties": { "apnsCertificate": "MIINEQIBAzCCDNgGCSqGSIb3DQEHAaCCDMkEggzFMIIMwTCCBzcGCSqGSIb3DQEHBqCCBygwggckAgEAMIIHHQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIm1Wr ", "certificateKey": "summa2017" } } } } ] } }

VERBOSE: 6:53:47 PM - Template is valid.

Confirm Continue with this operation? [Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): A DEBUG: ============================ HTTP REQUEST ============================

HTTP Method: PUT

Absolute Uri: https://management.azure.com/subscriptions/****-*********.*****/resourcegroups/pradebbanrm/providers/Micros oft.Resources/deployments/pradebban?api-version=2017-05-10

Headers: x-ms-client-request-id : cc6b57d2-0404-48d9-be29-3d779e5aa784 accept-language : en-US

Body: { "properties": { "template": { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "NamespaceName": { "type": "string", "minLength": 4, "maxLength": 20, "metadata": { "description": "Name of the NotificationHub Namespace." } }, "NotificationHubSKU": { "type": "string", "allowedValues": [ "Free", "Standard", "Premium" ], "metadata": { "description": "The Scale tier of NotificationHub." } }, "NotificationhubName": { "type": "string", "minLength": 5, "maxLength": 50, "metadata": { "description": "Name of the Notificationhub" } }, "googleApiKey": { "type": "string", "metadata": { "description": "Google API key for authenticating with GCM" } }, "apnsCertificate": { "type": "string", "metadata": { "description": "A certificate (in base 64 format) provided by Apple on the iOS Provisioning Portal" } }, "certificateKey": { "type": "string", "metadata": { "description": "The Certificate Key provided by the iOS Provisioning Portal when registering the application" } }, "Environment": { "type": "string", "metadata": { "description": "Environment Tag" } } }, "variables": { "location": "[resourceGroup().location]" }, "resources": [ { "type": "Microsoft.NotificationHubs/namespaces", "sku": { "name": "[parameters('NotificationHubSKU')]" }, "kind": "NotificationHub", "name": "[parameters('NamespaceName')]", "apiVersion": "2017-04-01", "location": "[variables('location')]", "scale": null, "properties": { "namespaceType": "NotificationHub" }, "tags": { "Environment": "[parameters('Environment')]" } }, { "type": "Microsoft.NotificationHubs/namespaces/notificationHubs", "name": "[parameters('NotificationhubName')]", "apiVersion": "2017-04-01", "location": "[variables('location')]", "scale": null, "properties": { "gcmCredential": { "properties": { "googleApiKey": "[parameters('googleApiKey')]" } }, "apnsCredential": { "properties": { "apnsCertificate": "[parameters('apnsCertificate')]", "certificateKey": "[parameters('certificateKey')]" } } }, "tags": { "Environment": "[parameters('Environment')]" }, "dependsOn": [ "[resourceId('Microsoft.NotificationHubs/namespaces', parameters('NamespaceName'))]" ] } ] }, "parameters": { "googleApiKey": { "value": "zaSyBPpu818OoPCc" }, "certificateKey": { "value": "summa2017" }, "NamespaceName": { "value": "pradebban" }, "apnsCertificate": { "value": "MIINEQIBAzCCDNgGCSqGSIb3DQEHAaCCDMkEggzFMIIMwTCCBzcGCSqGSIb3DQEHBqCCBygwggckAgEAMIIHHQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIm1Wr" }, "Environment": { "value": "PRADEBBAN" }, "NotificationhubName": { "value": "pradebban/notificationhub" }, "NotificationHubSKU": { "value": "Free" } }, "mode": "Incremental" } }

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

Status Code: OK

Headers: Pragma : no-cache Azure-AsyncOperation : https://management.azure.com/subscriptions/****-*********.*****/resourcegroups/pradebbanrm/providers/Micros oft.Resources/deployments/pradebban/operationStatuses/08586891068560913225?api-version=2017-05-10 x-ms-ratelimit-remaining-subscription-writes: 1198 x-ms-request-id : 09d89e7e-ce67-42c9-aa92-bad8cc78562e x-ms-correlation-request-id : 09d89e7e-ce67-42c9-aa92-bad8cc78562e x-ms-routing-request-id : EASTUS:20171205T185349Z:09d89e7e-ce67-42c9-aa92-bad8cc78562e Strict-Transport-Security : max-age=31536000; includeSubDomains Cache-Control : no-cache Date : Tue, 05 Dec 2017 18:53:49 GMT

Body: { "id": "/subscriptions/-*****.*/resourceGroups/pradebbanrm/providers/Microsoft.Resources/deployments/p radebban", "name": "pradebban", "properties": { "templateHash": "16569092262", "parameters": { "namespaceName": { "type": "String", "value": "pradebban" }, "notificationHubSKU": { "type": "String", "value": "Free" }, "notificationhubName": { "type": "String", "value": "pradebban/notificationhub" }, "googleApiKey": { "type": "String", "value": "zaS8OoPCc" }, "apnsCertificate": { "type": "String", "value": "MIINEQIBAzCCDNgGCSqGSIb3DQEHAaCCDMkEggzFMIIMwTCCBzcGCSqGSIb3DQEHBqCCBygwggckAgEAMIIHHQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIm1Wr " }, "certificateKey": { "type": "String", "value": "summa2017" }, "environment": { "type": "String", "value": "PRADEBBAN" } }, "mode": "Incremental", "provisioningState": "Accepted", "timestamp": "2017-12-05T18:53:49.5466426Z", "duration": "PT0.1603342S", "correlationId": "09d89e7e-ce67-42c9-aa92-bad8cc78562e", "providers": [ { "namespace": "Microsoft.NotificationHubs", "resourceTypes": [ { "resourceType": "namespaces", "locations": [ "eastus" ] }, { "resourceType": "namespaces/notificationHubs", "locations": [ "eastus" ] } ] } ], "dependencies": [ { "dependsOn": [ { "id": "/subscriptions/-*****.*/resourceGroups/pradebbanrm/providers/Microsoft.NotificationHubs/namesp aces/pradebban", "resourceType": "Microsoft.NotificationHubs/namespaces", "resourceName": "pradebban" } ], "id": "/subscriptions/-*****.*/resourceGroups/pradebbanrm/providers/Microsoft.NotificationHubs/namesp aces/pradebban/notificationHubs/notificationhub", "resourceType": "Microsoft.NotificationHubs/namespaces/notificationHubs", "resourceName": "pradebban/notificationhub" } ] } }

VERBOSE: 6:53:49 PM - Create template deployment 'pradebban' VERBOSE: 6:53:49 PM - Checking deployment status in 5 seconds DEBUG: ============================ HTTP REQUEST ============================

HTTP Method: GET

Absolute Uri: https://management.azure.com/subscriptions/****-*********.*****/resourcegroups/pradebbanrm/deployments/prad ebban/operations?api-version=2017-05-10

Headers: x-ms-client-request-id : a182cc2d-d427-4d41-bee6-849949034918 accept-language : en-US

Body:

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

Status Code: OK

Headers: Pragma : no-cache x-ms-ratelimit-remaining-subscription-reads: 14986 x-ms-request-id : 7ff92234-ef17-4299-9cc6-47827d6f3d54 x-ms-correlation-request-id : 7ff92234-ef17-4299-9cc6-47827d6f3d54 x-ms-routing-request-id : EASTUS:20171205T185354Z:7ff92234-ef17-4299-9cc6-47827d6f3d54 Strict-Transport-Security : max-age=31536000; includeSubDomains Cache-Control : no-cache Date : Tue, 05 Dec 2017 18:53:54 GMT

Body: { "value": [ { "id": "/subscriptions/-*****.*/resourceGroups/pradebbanrm/providers/Microsoft.Resources/deployments/p radebban/operations/3F5AA13A6EAF56AC", "operationId": "3F5AA13A6EAF56AC", "properties": { "provisioningOperation": "Create", "provisioningState": "Failed", "timestamp": "2017-12-05T18:53:51.7379348Z", "duration": "PT0.6035801S", "trackingId": "755db17a-77fa-422e-bde2-3f79fb191305", "serviceRequestId": "05e6641e-4ba4-4df4-9442-df5d3ce5e0dc_M6_M6", "statusCode": "BadRequest", "statusMessage": { "error": { "message": "Bad Request", "code": "BadRequest" } }, "targetResource": { "id": "/subscriptions/-*****.*/resourceGroups/pradebbanrm/providers/Microsoft.NotificationHubs/namesp aces/pradebban/notificationHubs/notificationhub", "resourceType": "Microsoft.NotificationHubs/namespaces/notificationHubs", "resourceName": "pradebban/notificationhub" } } }, { "id": "/subscriptions/-*****.*/resourceGroups/pradebbanrm/providers/Microsoft.Resources/deployments/p radebban/operations/35C730026AE46DAE", "operationId": "35C730026AE46DAE", "properties": { "provisioningOperation": "Create", "provisioningState": "Succeeded", "timestamp": "2017-12-05T18:53:51.0919011Z", "duration": "PT0.5873916S", "trackingId": "f16cd50e-7057-4a9f-921b-00c483e9d0f3", "serviceRequestId": "a9678c6c-0c87-4928-bd72-a7cf351a5994_M6_M6", "statusCode": "OK", "targetResource": { "id": "/subscriptions/-*****.*/resourceGroups/pradebbanrm/providers/Microsoft.NotificationHubs/namesp aces/pradebban", "resourceType": "Microsoft.NotificationHubs/namespaces", "resourceName": "pradebban" } } }, { "id": "/subscriptions/-*****.*/resourceGroups/pradebbanrm/providers/Microsoft.Resources/deployments/p radebban/operations/08586891068560913225", "operationId": "08586891068560913225", "properties": { "provisioningOperation": "EvaluateDeploymentOutput", "provisioningState": "Failed", "timestamp": "2017-12-05T18:53:51.9375269Z", "duration": "PT0.1591651S", "trackingId": "b5dcf82a-88d6-4582-85a9-44e1a74143bd", "statusCode": "Conflict", "statusMessage": "Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details." } } ] }

Confirm 6:53:54 PM - Resource Microsoft.NotificationHubs/namespaces/notificationHubs 'pradebban/notificationhub' failed with message '{ "error": { "message": "Bad Request", "code": "BadRequest" } }' [Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): A New-AzureRmResourceGroupDeployment : 6:53:54 PM - Resource Microsoft.NotificationHubs/namespaces/notificationHubs 'pradebban/notificationhub' failed with message '{ "error": { "message": "Bad Request", "code": "BadRequest" } }' At line:1 char:1

VERBOSE: 6:53:56 PM - Resource Microsoft.NotificationHubs/namespaces 'pradebban' provisioning status is succeeded New-AzureRmResourceGroupDeployment : 6:53:56 PM - Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details. At line:1 char:1

New-AzureRmResourceGroupDeployment : 6:53:56 PM - Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details. At line:1 char:1

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

HTTP Method: GET

Absolute Uri: https://management.azure.com/subscriptions/****-*********.*****/resourcegroups/pradebbanrm/providers/Micros oft.Resources/deployments/pradebban?api-version=2017-05-10

Headers: x-ms-client-request-id : 11a5fcc0-7b72-4fdf-a414-7060fd40afe3 accept-language : en-US

Body:

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

Status Code: OK

Headers: Pragma : no-cache x-ms-ratelimit-remaining-subscription-reads: 14985 x-ms-request-id : d205e974-ee01-40c4-a013-16d8e8a21558 x-ms-correlation-request-id : d205e974-ee01-40c4-a013-16d8e8a21558 x-ms-routing-request-id : EASTUS:20171205T185357Z:d205e974-ee01-40c4-a013-16d8e8a21558 Strict-Transport-Security : max-age=31536000; includeSubDomains Cache-Control : no-cache Date : Tue, 05 Dec 2017 18:53:56 GMT

Body: { "id": "/subscriptions/-/resourceGroups/pradebbanrm/providers/Microsoft.Resources/deployments/p radebban", "name": "pradebban", "properties": { "templateHash": "165698092262", "parameters": { "namespaceName": { "type": "String", "value": "pradebban" }, "notificationHubSKU": { "type": "String", "value": "Free" }, "notificationhubName": { "type": "String", "value": "pradebban/notificationhub" }, "googleApiKey": { "type": "String", "value": "IzaCc" }, "apnsCertificate": { "type": "String", "value": "MIINEQIBAzCCDNgGCSqGSIb3DQEHAaCCDMkEggzFMIIMwTCCBzcGCSqGSIb3DQEHBqCCBygwggckAgEAMIIHHQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIm1Wr n0vEbpyMNi0nU0wMDAhMAkGBSsOAwIaBQAEFJ3hvq5R4ufwn/yVDNbgfC/DDkiDBAjtHhAoUSiL7AIBAQ==" }, "certificateKey": { "type": "String", "value": "summa2017" }, "environment": { "type": "String", "value": "PRADEBBAN" } }, "mode": "Incremental", "provisioningState": "Failed", "timestamp": "2017-12-05T18:53:51.9679701Z", "duration": "PT2.5816617S", "correlationId": "8cc78562e", "providers": [ { "namespace": "Microsoft.NotificationHubs", "resourceTypes": [ { "resourceType": "namespaces", "locations": [ "eastus" ] }, { "resourceType": "namespaces/notificationHubs", "locations": [ "eastus" ] } ] } ], "dependencies": [ { "dependsOn": [ { "id": "/subscriptions/-*./resourceGroups/pradebbanrm/providers/Microsoft.NotificationHubs/namesp aces/pradebban", "resourceType": "Microsoft.NotificationHubs/namespaces", "resourceName": "pradebban" } ], "id": "/subscriptions/***-.*****/resourceGroups/pradebbanrm/providers/Microsoft.NotificationHubs/namesp aces/pradebban/notificationHubs/notificationhub", "resourceType": "Microsoft.NotificationHubs/namespaces/notificationHubs", "resourceName": "pradebban/notificationhub" } ], "error": { "code": "DeploymentFailed", "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details.", "details": [ { "code": "BadRequest", "message": "{\r\n \"error\": {\r\n \"message\": \"Bad Request\",\r\n \"code\": \"BadRequest\"\r\n }\r\n}" } ] } } }

DeploymentName : pradebban ResourceGroupName : pradebbanrm ProvisioningState : Failed Timestamp : 12/5/2017 6:53:51 PM Mode : Incremental TemplateLink : Parameters : Name Type Value =============== ========================= ========== namespaceName String pradebban notificationHubSKU String Free notificationhubName String pradebban/notificationhub googleApiKey String vxL818OoPCc apnsCertificate String MIINEQIBAzCCnee32KyEFUlBhHqc3pgFUWdOf63dd certificateKey String FDFDF017 environment String PRADEBBAN

Outputs : DeploymentDebugLogLevel :

DEBUG: AzureQoSEvent: CommandName - New-AzureRmResourceGroupDeployment; IsSuccess - False; Duration - 00:00:12.6893166; Exception

Script/Steps for Reproduction

New-AzureRmResourceGroupDeployment -Name pradebban -ResourceGroupName pradebban -TemplateParameterFile "NotificationHub_Param.json" -TemplateFile "NotificationHub_Deploy.json"

Use a valid template and validate using, Test-AzureRmResourceGroupDeployment

maddieclayton commented 6 years ago

@rajaprad Can you run Resolve-AzureRmError after running these cmdlets and send us the output? This will give us more information about the error that is being returned.

rajaprad commented 6 years ago

@maddieclayton - Find below.

Message : 1:13:23 AM - Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details. Please see https: //aka.ms/arm-debug for usage details. StackTrace : Exception : System.Exception InvocationInfo : { "New-AzureRmResourceGroupDeployment" } Line : New-AzureRmResourceGroupDeployment -Name pradebban -ResourceGroupName pradebban -TemplateParameterFile "NotificationParam.json" -TemplateFile "NotificationTemplate.json" -Debug Position : At line:1 char:1 + New-AzureRmResourceGroupDeployment -Name pradebban -ResourceGroupName ... + ~~~~~~~~~~~~~~~~~ HistoryId : 55 Message : 1:13:23 AM - Template output evaluation skipped: at least one resource deployment operation failed. Please list deployment operations for details. Please see https: //aka.ms/arm-debug for usage details. StackTrace : Exception : System.Exception InvocationInfo : { New-AzureRmResourceGroupDeployment } Line : New-AzureRmResourceGroupDeployment -Name pradebban -ResourceGroupName pradebban -TemplateParameterFile "NotificationParam.json" -TemplateFile "NotificationTemplate.json" -Debug Position : At line:1 char:1 + New-AzureRmResourceGroupDeployment -Name pradebban -ResourceGroupName ... + ~~~~~~~~~~~~~~~ HistoryId : 55 Message : 1:13:19 AM - Resource Microsoft.NotificationHubs/namespaces/notificationHubs 'pradebban/sdnnotificationhu' failed with message '{ "error": { "message": "Bad Request", "code": "BadRequest" } }' StackTrace : Exception : System.Exception InvocationInfo : { New-AzureRmResourceGroupDeployment } Line : New-AzureRmResourceGroupDeployment -Name pradebban -ResourceGroupName pradebban -TemplateParameterFile "Notification.json" -TemplateFile "NotificationTemplate.json" -Debug Position : At line:1 char:1 + New-AzureRmResourceGroupDeployment -Name pradebban -ResourceGroupName ... + ~~~~~~~~~~~~~~~ HistoryId : 55

rajaprad commented 6 years ago

@shahabhijeet @cormacpayne @markcowl @maddieclayton - as a public user, i do not have control of assigning back the issue to @maddieclayton - for further action. Please transfer the assignment!!

rajaprad commented 6 years ago

@maddieclayton, Any movement on this please ? This is a breaking change for us to move with 5.0.1

markcowl commented 6 years ago

@rajaprad This looks like a failure in the underlying notification hubs deployment - you will need to look up the service log in the portal. You can use the tracking id or request id for the failed request to do so. For example, the request that failed had tracking id: 7ff92234-ef17-4299-9cc6-47827d6f3d54

rajaprad commented 6 years ago

@markcowl - The portal log just had "BadRequest". And to make things very specific to 5.0.1 - I downgraded Azure PowerShell to 4.x - deployment worked with same template and parameters!

maddieclayton commented 6 years ago

@ravbhatnagar @vivsriaus Can you take a look at this issue? Looks like a possible regression from a previous version of ResourceManager.