Terraform-provider-azurerm: azurerm_recovery_services_vault: Sku parameter is invalid

Created on 8 Nov 2018  ·  4Comments  ·  Source: terraform-providers/terraform-provider-azurerm

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Terraform v0.11.7
provider.azurerm ~> 1.4

Affected Resource(s)

azurerm_recovery_services_vault

Terraform Configuration Files

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"
  }
}

Debug Output

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}}"

Expected Behavior

Update/Apply successfully

Actual Behavior

Says the sku is wrong.

Steps to Reproduce

I added some tags so i had things to apply when i ran into this.

bug servicrecovery-services

All 4 comments

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!

Was this page helpful?
0 / 5 - 0 ratings