Terraform v0.11.7
provider.azurerm ~> 1.4
azurerm_recovery_services_vault
resource "azurerm_recovery_services_vault" "Backupvault" {
name = "Backupvault"
location = "${azurerm_resource_group.our-rg.location}"
resource_group_name = "${azurerm_resource_group.our-rg.name}"
sku = "RS0"
tags = {
t1 = "xxx"
t2 = "yyy"
}
}
https://gist.github.com/Midacts/ebcc6cd9edcb24baaf6296bb1af1555a
Azure error:
"statusMessage": "{\"error\":{\"code\":\"InvalidRestApiParameter\",\"message\":\"sku parameter is invalid.\r\nPlease provide a valid sku\",\"target\":null,\"details\":null,\"innerError\":null}}"
Update/Apply successfully
Says the sku is wrong.
I added some tags so i had things to apply when i ran into this.
Hi @Midacts,
RS0 is a value that the portal uses, but doesn't seem to be supported via the API. Have you tried the Standard SKU yet?
I tried a plan but never an apply until you suggested it (in case it tried to delete and recreate it)
When I changed "RS0" to "Standard" and run terraform plan:
Terraform will perform the following actions:
~ azurerm_recovery_services_vault.Backupvault
sku: "RS0" => "Standard"
When I ran terraform apply:
azurerm_recovery_services_vault.Backupvault: Modifying... (ID: /subscriptions/xxx-...ft.RecoveryServ
ices/vaults/Backupvault)
sku: "RS0" => "Standard"
azurerm_recovery_services_vault.Backupvault: Modifications complete after 1s (ID: /subscriptions/xxx-...ft.RecoveryServices/vaults/Backupvault)
It seems to have worked.
(That was a bit sketch but thanks for helping me).
Can this issue be reopened? Yes, it works with Standard, but RS0 is also a documented value that should be accepted. See the documentation: https://www.terraform.io/docs/providers/azurerm/r/recovery_services_vault.html
sku - (Required) Sets the vault's SKU. Possible values include: Standard, RS0.
RS0 seems to be undocumented by Microsoft, but looking at the generated ARM template it seems to be what you need to set if you want LRS storage for the backups (instead of the default GRS).
What is interesting I think, is that in the ARM template it looks as follows:
"sku": {
"name": "RS0",
"tier": "Standard"
},
Whereas for GRS it looks as follows:
"sku": {
"name": "Standard"
},
So possibly you need to set "tier": "Standard" when setting the sku name to "RS0".
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!