Azure / Azure/azure-powershell
[Feature]: Support for DynamicScope Assignment for UpdateManager
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 54
Description
### Description of the new feature
It looks like `New-AzConfigurationAssignment` can only able to create the assignments within subscriptions.
The design of dynamic scope assignment is a little different as it creates resources at the subscription level and not at any RG level. So the resource id will look like
`subscriptions/xxxxx/providers/Microsoft.Maintenance/configurationAssignments/DynamicAssignment1`
Currently, the only way to create this using REST API (management)
Lets assume the maintaince configuration is at SubA, and you have to create the dynamic assignment by including SubB and SubC, then you have to follow below
```
PUT https://management.azure.com/subscriptions/xxxxx/providers/Microsoft.Maintenance/configurationAssignments/DynamicAssignment_SubB?api-version=2023-04-01"
{
"location": "",
"properties": {
"maintenanceConfigurationId": "/subscriptions/yyyy/resourceGroups/maintenance-config-rg/providers/Microsoft.Maintenance/maintenanceConfigurations/mgconfig01_SubA"
}
}
```
```
PUT https://management.azure.com/subscriptions/zzzz/providers/Microsoft.Maintenance/configurationAssignments/DynamicAssignment_SubC?api-version=2023-04-01"
{
"location": "",
"properties": {
"maintenanceConfigurationId": "/subscriptions/yyyy/resourceGroups/maintenance-config-rg/providers/Microsoft.Maintenance/maintenanceConfigurations/mgconfig01_SubA"
}
}
```
-----
Can we enhance `New-AzConfigurationAssignment` or comeup with a new cmdlet that can help us to create the assignment for multiple subscription (dynamicscope level)
### Proposed implementation details (optional)
Can we enhance `New-AzConfigurationAssignment` or comeup with a new cmdlet that can help us to create the assignment for multiple subscription (dynamicscope level)
Reference: https://stackoverflow.com/a/78038174/7073340
Contributor guide
Research direction
Start by locating the New-AzConfigurationAssignment cmdlet and the code that builds its subscription-level assignment request. Compare that behavior with the Microsoft.Maintenance configurationAssignments REST examples in the issue, then determine whether the existing cmdlet or a new cmdlet should support assignments across multiple subscriptions. Done means the chosen interface can create dynamic-scope assignments for the target subscriptions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, powershell
- Domain
- cli, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100