Azure / Azure/azure-policy

Alias Request: Microsoft.OperationalInsights/workspaces/retentionInDays

Open
#1,002 1 comment 0 reactions 0 assignees View on GitHub
alias-request
Dominant language
Open Policy Agent
Stars
1.7k
Forks
1.2k
Avg merge
2d 54m
Merged PRs (30d)
3

Description

###### Error Message
"The policy definition 'modify_logAnalytics_retentionDays' has operations referring to aliases that are not modifiable: 'Microsoft.OperationalInsights/workspaces/retentionInDays'.

###### Policy
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.OperationalInsights/workspaces"
},
{
"anyOf": [
{
"field": "Microsoft.OperationalInsights/workspaces/retentionInDays",
"notEquals": "[parameters('retentionInDays')]"
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"roleDefinitionIds": [
"/providers/microsoft.authorization/roleDefinitions/92aaf0da-9dab-42b6-94a3-d43ce8d16293"
],
"conflictEffect": "Audit",
"operations": [
{
"operation": "addOrReplace",
"field": "Microsoft.OperationalInsights/workspaces/retentionInDays",
"value": "[parameters('retentionInDays')]"
}
]
}
}
}

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the Azure Policy alias metadata and the supplied policy definition for Microsoft.OperationalInsights/workspaces/retentionInDays. Confirm whether the alias supports the requested addOrReplace operation, then verify the policy no longer reports the non-modifiable-alias error.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.