You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When updating from the old resources modules, the below code set the managedBy to ''
@description('Optional. The ID of the resource that manages this resource group.')
param managedBy string = ''
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
location: location
name: name
tags: tags
managedBy: managedBy
properties: {}
}
In the new AVM modules its commented out and so its reverts to $null
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
location: location
name: name
tags: tags
// managedBy: managedBy // removed due to immutable string, only used for managed resource groups
properties: {}
}
When testing, it will try and update the property but this is not allowed
"details": [
{
"code": "ResourceGroupManagedByMismatch",
"message": "The managed by property of the resource group cannot be changed from its current value ''."
}
]
To reproduce
Deploy a resource group using the resource deployment of
Update the code to comment out the managedBy property
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
location: location
name: name
tags: tags
// managedBy: managedBy // removed due to immutable string, only used for managed resource groups
properties: {}
}
Code snippet
resourceresourceGroup'Microsoft.Resources/resourceGroups@2021-04-01' = {
location: locationname: nametags: tagsmanagedBy: managedByproperties: {}
}
resourceresourceGroup'Microsoft.Resources/resourceGroups@2021-04-01' = {
location: locationname: nametags: tags// managedBy: managedBy // removed due to immutable string, only used for managed resource groupsproperties: {}
}
Relevant log output
"details": [
{
"code": "ResourceGroupManagedByMismatch",
"message": "The managed by property of the resource group cannot be changed from its current value ''."
}
]
The text was updated successfully, but these errors were encountered:
Describe the bug
When updating from the old resources modules, the below code set the managedBy to ''
In the new AVM modules its commented out and so its reverts to $null
When testing, it will try and update the property but this is not allowed
To reproduce
Deploy a resource group using the resource deployment of
Update the code to comment out the managedBy property
Code snippet
Relevant log output
The text was updated successfully, but these errors were encountered: