Azure / bicep-registry-modules

Bicep registry modules
MIT License
390 stars 257 forks source link

[AVM Module Issue]: Cannot deploy Recovery Services protection container and protection item #1935

Open jensdiedrich opened 2 weeks ago

jensdiedrich commented 2 weeks ago

Check for previous/existing GitHub issues

Issue Type?

Bug

Module Name

avm/res/recovery-services/vault

(Optional) Module Version

No response

Description

Deploying the following code snippets ( enable Azure Backup for existing VM ) does not work

module mod_protcontainer1 '../../../bicep-registry-modules/avm/res/recovery-services/vault/backup-fabric/protection-container/main.bicep' = {
  name: 'protcontainer1'
  scope: resourceGroup('rg-99996-001-dev')
  params: {
    name: 'IaasVMContainer;iaasvmcontainerv2;rg-99996-001-dev;vm-weu-002-dev'
    recoveryVaultName: 'rsv-weu-001-dev'
  }
}

module mod_prot_item '../../../bicep-registry-modules/avm/res/recovery-services/vault/backup-fabric/protection-container/protected-item/main.bicep' = {
     name: 'protitem1'
     scope: resourceGroup('rg-99996-001-dev')
     params: {
      name: 'VM;iaasvmcontainerv2;$rg-99996-001-dev;vm-weu-002-dev'
      protectedItemType: 'Microsoft.Compute/virtualMachines'
      policyId: '/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg-99996-001-dev/providers/Microsoft.RecoveryServices/vaults/rsv-weu-001-dev/backupPolicies/rsv-weu-dev-bkpol-001'
      sourceResourceId: '/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/rg-99996-001-dev/providers/Microsoft.Compute/virtualMachines/vm-weu-002-dev'
      recoveryVaultName: 'rsv-weu-001-dev'
      protectionContainerName:  mod_protcontainer1.outputs.name 
     }
}

Got the following error message when deploying

{"code":"CloudInvalidInputError","message":"The current operation failed due to an internal service error \"Invalid input error\". Please retry the operation after some time. If the issue persists, please contact Microsoft support."}

As far as I understand the documentation this should work and the vm should be configured for Azure Backup and registered in the Recovery Services vault ?

I`m not sure if I used the correct syntax for the protection container name and protection item name, but as far as I understand the documentation here (https://learn.microsoft.com/en-us/azure/backup/backup-azure-arm-userestapi-backupazurevms#enable-protection-for-the-azure-vm) it should work.

(Optional) Correlation Id

No response

microsoft-github-policy-service[bot] commented 2 weeks ago

[!IMPORTANT] The "Needs: Triage :mag:" label must be removed once the triage process is complete!

[!TIP] For additional guidance on how to triage this issue/PR, see the BRM Issue Triage documentation.

[!NOTE] This label was added as per ITA06.

microsoft-github-policy-service[bot] commented 2 weeks ago

[!NOTE] The "Type: Bug :bug:" label was added as per ITA21.

avm-team-linter[bot] commented 2 weeks ago

@jensdiedrich, thanks for submitting this issue for the avm/res/recovery-services/vault module!

[!IMPORTANT] A member of the @Azure/avm-res-recoveryservices-vault-module-owners-bicep or @Azure/avm-res-recoveryservices-vault-module-contributors-bicep team will review it soon!

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

[!WARNING] Tagging the AVM Core Team (@Azure/avm-core-team-technical-bicep) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly.

[!TIP]

  • To prevent further actions to take effect, the "Status: Response Overdue 🚩" label must be removed, once this issue has been responded to.
  • To avoid this rule being (re)triggered, the ""Needs: Triage :mag:" label must be removed as part of the triage process (when the issue is first responded to)!

[!NOTE] This message was posted as per ITA01BCP.

AlexanderSehr commented 1 week ago

Hey @alexanderojala, please take a look and triage the issue when you get the chance 💪

alexanderojala commented 1 week ago

I will look in to this issue and respond asap.

microsoft-github-policy-service[bot] commented 5 days ago

[!WARNING] Tagging the AVM Core Team (@Azure/avm-core-team-technical-bicep) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly.

[!TIP]

  • To prevent further actions to take effect, the "Status: Response Overdue 🚩" label must be removed, once this issue has been responded to.
  • To avoid this rule being (re)triggered, the ""Needs: Triage :mag:" label must be removed as part of the triage process (when the issue is first responded to)!

[!NOTE] This message was posted as per ITA01BCP.

microsoft-github-policy-service[bot] commented 5 days ago

[!CAUTION] This issue requires the AVM Core Team's (@Azure/avm-core-team-technical-bicep) immediate attention as it hasn't been responded to within 6 business days.

[!TIP]

  • To avoid this rule being (re)triggered, the "Needs: Triage :mag:" and "Status: Response Overdue :triangular_flag_on_post:" labels must be removed when the issue is first responded to!
  • Remove the "Needs: Immediate Attention :bangbang:" label once the issue has been responded to.

[!NOTE] This message was posted as per ITA02BCP.

AlexanderSehr commented 4 days ago

Hey @alexanderojala, just a quick sidenote - given that you said you'd look into it, I recommend to remove the needs: triage label as it will stop the bot from creating new comments over and over :) I'll do that for you in this case and it's more like an fyi 😉