Search code examples
azureazure-rm-templateazure-resource-group

Exported Azure Resource Group Template has null parameters


Trying to recreate a resource group from template I previously exported but getting this error :

The value of deployment parameter 'Redis_polyrediscachegraphicsxp_name' is null. Please specify the value or use the parameter reference.

Indeed the parameters.json file has null values :

 "parameters": {
    "Redis_polyrediscachegraphicsxp_name": {
        "value": null
    },
    "storageAccounts_polystorgraphicsxp_name": {
        "value": null
    },
    "databaseAccounts_polycosmosgraphicsxp_name": {
        "value": null
    }
}

How can this be fixed ?


Solution

  • The error already shows the mistake you made. Your parameters are null. So you need to change your parameters.json file with the right values like this:

    "parameters": {
        "Redis_polyrediscachegraphicsxp_name": {
            "value": "xxxxxx"
        },
        "storageAccounts_polystorgraphicsxp_name": {
            "value": "xxxxxx"
        },
        "databaseAccounts_polycosmosgraphicsxp_name": {
            "value": "xxxxxx"
        }
    }
    

    Take the example here.