Azure / Azure/Azure-DataFactory
Invalid ARM created when using the data-factory-export-action
- Dominant language
- PowerShell
- Stars
- 529
- Forks
- 623
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
We are using the `Azure/data-factory-export-action@v1.1.0` action to generate an ARM template from our Data Factory resources. The actions itself works fine, but the ARM template it generates is invalid.
This causes the `azure/arm-deploy@main` action to fail with the following error:
```shell
'str' object has no attribute 'get'
```
I think this is caused by the fact that the `metadata` field is a string instead of an object (as described in the jsonschema).
A snippet of the generated ARM template:
```json
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"factoryName": {
"type": "string",
"metadata": "Data Factory name",
"defaultValue": "factory"
},
...
}
```
This can also been seen in the debug information:
```shell
File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/resource/custom.py", line 191, in _prompt_for_parameters
description = metadata.get('description', description)
AttributeError: 'str' object has no attribute 'get'
```
How can we fix the problem? Is there maybe something wrong with the adf bundle: `https://adf.azure.com/assets/cmd-api/main.js`?
Contributor guide
Assessment
This issue has not been assessed yet.