-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Backup Policy type "SQL Server in Azure VM" #3910
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
also need this |
The issue / feature request applies to workload-type= |
Extremely interested in this. Any updates on this request ? |
Interested in this, any update? |
Also need this feature! |
Azure Backup for Workloads definetly needs some love and support, multiple customer cases where we'd need native Terraform support for this feature (with HANA but should be implemented across the board). |
Extremely interested see any progress on this topic |
We also really need support for SQL in Azure VM policies |
Any update on this please??? We need this ASAP to complete out Vault Service autmation. |
I was also looking how I could add SQL to Recovery Servies Vault and I found this PR: #17765 |
This functionality is now released with provider version 3.20.0. Please see the details of the issue, mentioned above. |
I am trying to backup SQL in Azure VM and used the policy azurerm_backup_policy_vm_workload with azurerm provider version 3.23.0. The policy is successfully deployed in Azure but I couldn't find any resource to backup SQL in Azure VM. I tried using azurerm_backup_protected_vm by passing virtualMachines ID and SqlVirtualMachines ID but both resulted in errors. Am I missing something? Is only backup policy available at the moment? Is the backup of SQL in Azure VM still not supported using Terraform? |
@ArjunMR89 : Yes, currently only backup policy is available on Terraform. We are working on integration SQL backup too. So, you have the Azure VM registered as SQL VM? |
@pvrk Thank you for the reply. Yes, I have Azure VM registered as SQL VM. Could you please suggest any workaround till the SQL backup is released? |
i am using azapi_resource for now |
Any chance you can share your working code? |
Just created the policy in Azure and exported the json and then used this resource "azapi_resource" "SQLBackupPolicy" {
name = var.policy_name
parent_id = azurerm_recovery_services_vault.sqlsupport.id
type = "Microsoft.RecoveryServices/vaults/backupPolicies@2022-03-01"
ignore_missing_property = false
body = templatefile("${path.module}/templates/${var.policy_name}.json.tftpl", {
"timezone" : var.timezone
})
schema_validation_enabled = false
} |
The resource has been released in August: azurerm_backup_policy_vm_workload https://github.com/hashicorp/terraform-provider-azurerm/releases/tag/v3.20.0 |
The documentation has an example
And when trying to deploy almost identical configuration:
It fails with not-so-clear error
The provider (azurerm 3.37) adds |
There is no frequency_in_minutes in "backup" (I don't see it in the documentation). There is frequency = "Hourly" The weekdays is just initialized, even it's not defined in the code. |
Considering that there are only a few parameters in the Log policy (and the protection_policy is exactly the same as in the documentation example), my assumption was that the Azure API is complaining due to the weekdays[], didn't check what terraform is sending to the API. Could be something else, too. We have had working code for workload backup policies a long time through ARM deployment with azurerm_resource_group_template_deployment and I was just planning to switch to AzAPI when I noticed that the new native resource exists, which we would prefer but it worked only for the weekly and daily policies, not for the Log policy. The Log policy there deploys fine with protection policy:
|
hi, any update on that? |
Hi guys, Any updates on this? ATM we can only create VM Workload but there is no way to associate SQL VM's to that Workload using Terraform... |
+1 I was hoping to automate this setup too, but wasn't obvious and I ended up here, I guess for the moment I'll have to use the Azure Portal to manually configure 😢 |
Community Note
Description
The ability to create a backup policy for Policy Type = 'SQL Server in Azure VM'
New or Affected Resource(s)
Cannot create backup policy for SQL Server in Azure VM.
Potential Terraform Configuration
References
https://github.com/Azure/azure-quickstart-templates/tree/master/101-recovery-services-vm-workload-backup
The text was updated successfully, but these errors were encountered: