Azure / azure-policy

Repository for Azure Resource Policy built-in definitions and samples
MIT License
1.51k stars 1.09k forks source link

Configure Backup Policies missing Ubuntu 24.04 #1381

Open jbarrancos opened 2 months ago

jbarrancos commented 2 months ago

Details of the scenario you tried and the problem that is occurring

Deployment of VM image Ubuntu 24.04:

Source image publisher: canonical Source image offer: ubuntu-24_04-lts Source image plan: server

Verbose logs showing the problem

Ubuntu 24.04 is outside rules in the policy. The current selection of SKU's are:

"anyOf": [
  {
    "field": "Microsoft.Compute/imageSKU",
    "like": "14.04*LTS"
  },
  {
    "field": "Microsoft.Compute/imageSKU",
    "like": "16.04*LTS"
  },
  {
    "field": "Microsoft.Compute/imageSKU",
    "like": "18.04*LTS"
  },
  {
    "field": "Microsoft.Compute/imageSKU",
    "like": "*20_04-lts"
  },
  {
    "field": "Microsoft.Compute/imageSKU",
    "like": "20_04-lts*"
  },
  {
    "field": "Microsoft.Compute/imageSKU",
    "like": "22_04-lts-gen2"
  }
]

Suggested solution to the issue

Add new SKU to the policy rules:

{
  "field": "Microsoft.Compute/imageSKU",
  "like": "24_04-lts"
}