0

Got error 'resourceGroupName' is not defined for Azure ARM template deployment

File "./__main__.py", line 23, in <module>
        resourceGroupName: resource_group.name,
    NameError: name 'resourceGroupName' is not defined
  

relevant part of code here, not sure where to look for TemplateDeployment docs , can't see them in API reference

armDeployment = azure.core.TemplateDeployment("test-dep", {
    resourceGroupName: resource_group.name,
    templateBody: JSON.stringify(content),
    parameters: {
        "storageAccountType": "Standard_GRS",
    },
    deploymentMode: "Incremental",
})
irom
  • 3,316
  • 14
  • 54
  • 86

1 Answers1

3

As shown in the docs the correct property name for the resource group is: resource_group_name and also template_body not templateBody. So it should work if you change it like this:

armDeployment = azure.core.TemplateDeployment("test-dep", {
     resource_group_name: resource_group.name,
     template_body: JSON.stringify(content),
     parameters: {
        "storageAccountType": "Standard_GRS",
     },
     deployment_mode: "Incremental",
})
Mihail Stancescu
  • 4,088
  • 1
  • 16
  • 21