Azure / pcs-cli

A CLI for deploying Azure IoT PCS
MIT License
33 stars 37 forks source link

The value of 'storageName' is not provided when deploy to Azure China (Mooncake) #521

Closed lzyms closed 3 years ago

lzyms commented 5 years ago

Type of issue

Description

When running: pcs -t remotemonitoring -s basic, an error occured when do deployment validation. It returns the following error: Deployment validation failed: { "code": "InvalidTemplate", "message": "Deployment template validation failed: 'The value for the template parameter 'storageName' at line '1' and✕ Error: {"code":"InvalidTemplate","message":"Deployment template validation failed: 'The value for the template parameter 'storageName' at line '1' and column '689' is not provided. Please see https://aka.ms/arm-deploy/#parameter-file for usage details.'."}

Steps to reproduce

  1. pcs login -e AzureChinaCloud
  2. pcs -t remotemonitoring -s basic

Expected behavior

Deployment validation succeed and go to the next step

Current behavior

Deployment validation failed and block deployment process

Known workarounds

Add default Value for 'storageName' setting in basic-static-map.json as the following change: "storageName": { "type": "string", "defaultValue": "[concat('storage', take(uniqueString(subscription().subscriptionId, resourceGroup().id, parameters('solutionName')), 5))]", "metadata": { "description": "The name of the storageAccount" } }

Possible solution

Add default value for 'storageName' setting in arm template

Context and Environment