Azure / bicep-types-az

Bicep type definitions for ARM resources
MIT License
84 stars 27 forks source link

Missing PolicySubType (Enhanced, Standard) on 'Microsoft.RecoveryServices/vaults/backupPolicies' #1644

Open MCFrandsen opened 1 year ago

MCFrandsen commented 1 year ago

Bicep version 0.14.0

Describe the bug

When creating a Backup Policy, it defaults to 'Standard' as the policy sub type. There is no option for creating a Enhanced Backup Policy through Bicep. Documentation

To Reproduce This step doesn't make sense in this context.

Additional context

An Enhanced Backup Policy is needed to backup trusted launch VM's and cannot use the Standard Policy. In addition, it cannot be created through the az cli either. The az has a list function with subtype but create has none:

az backup policy list --resource-group
                      --vault-name
                      [--policy-sub-type {Enhanced, Standard}]
az backup policy create --backup-management-type {AzureIaasVM, AzureStorage, AzureWorkload}

documentation

This is a bug report because the Bicep template is missing a key component in order to create backup policies as IaaC. If, however, it is a feature request, let me know.

MCFrandsen commented 1 year ago

This is kinda resolved. Through Terraform's documentation of backup policy, it can be found that policyType V1 and V2 refers to Standard and Enhanced respectively. When using V2, you must also use SimpleSchedulePolicyV2.

The bug is now lack of proper documentation.

microsoft-github-policy-service[bot] commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @pvrk, @adityabalaji-msft. Please see https://aka.ms/biceptypesinfo for troubleshooting help.