Terraform-provider-azurerm: soft_delete_retention_days is not expected here

Created on 28 Aug 2020  ·  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

Your version of Terraform is out of date! The latest version
is 0.13.1. You can update by downloading from https://www.terraform.io/downloads.html
Terraform v0.13.0
+ provider registry.terraform.io/hashicorp/azuread v0.11.0
+ provider registry.terraform.io/hashicorp/azurerm v2.24.0

Affected Resource(s)

  • azurerm_key_vault

Terraform Configuration Files

resource "azurerm_key_vault" "kv" {
  name                        = "snapshot-${var.prefix}-keyvault"
  location                    = azurerm_resource_group.rg.location
  resource_group_name         = azurerm_resource_group.rg.name
  enabled_for_disk_encryption = true
  tenant_id                   = data.azurerm_client_config.current.tenant_id
  soft_delete_enabled         = true
  soft_delete_retention_days  = 7
  purge_protection_enabled    = false

  sku_name = "standard"
}

Debug Output

Error: Unsupported argument

  on main.tf line 54, in resource "azurerm_key_vault" "kv":
  54:     soft_delete_retention_days  = 7

An argument named "soft_delete_retention_days" is not expected here.

Expected Behavior

This is pretty much a copy of the example from the docs. This should set the soft delete retention days to 7.

Actual Behavior

Error message generated. It's not clear how I set this property anymore?

Steps to Reproduce

terraform plan
  • #0000
question servickeyvault

All 4 comments

hi @sonic1981

Thanks for opening this issue.

Taking a look into this this is available from v2.25.0 of the Azure Provider - you're currently using v2.24.0 - which you can upgrade to by updating the version in the Provider block (as shown below) and then running terraform init -upgrade:

provider "azurerm" {
  version = "=2.25.0"
}

.. which should solve this for you - would you be able to take a look and see if that works for you? Since this should be fixed by upgrading the version of the provider being used here I'm going to close this issue for the moment - but please let us know if that doesn't work for you and we'll take another look.

Thanks!

ah good one, Thanks @tombuildsstuff Out of interested how did you find that out?

@sonic1981 I reviewed/merged it, but it's also in the changelog :)

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