Skip to content

azurerm_storage_account_customer_managed_key - An attribute named "key_vault_key_id" is not expected here #2169

@slideroh

Description

@slideroh

Extension Version

v2.37.6, tested on pre-release as well

VS Code Version

Version: 1.108.2 (user setup)
Commit: c9d77990917f3102ada88be140d28b038d1dd7c7
Date: 2026-01-21T13:52:09.270Z
Electron: 39.2.7
ElectronBuildId: 12953945
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Windows_NT x64 10.0.26200

Operating System

Ubuntu 24.04.1 LTS

Terraform Version

Terraform v1.14.4 on linux_amd64

Steps to Reproduce

  1. Create
resource "azurerm_storage_account_customer_managed_key" "test" {
  storage_account_id = azurerm_storage_account.main.id
  key_vault_key_id   = azurerm_key_vault_key.customer_managed_key[0].id
}
  1. You will see that parameters are highlighted with error:
Required attribute "key_name" not specified: An attribute named "key_name" is required hereTerraform
Unexpected attribute: An attribute named "key_vault_key_id" is not expected hereTerraform

It's not true because they changed it in v4.58 azurerm
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/storage_account_customer_managed_key

azurerm_storage_account_customer_managed_key

  • The deprecated key_vault_uri property has been removed in favour of the key_vault_key_id property.
  • The deprecated key_name property has been removed in favour of the key_vault_key_id property.
  • The deprecated key_version property has been removed in favour of the key_vault_key_id property.
  • The deprecated managed_hsm_key_id property has been removed in favour of the key_vault_key_id property.
  • The deprecated key_vault_id property has been removed in favour of the key_vault_key_id property.

Expected Behavior

VSCode Terraform extension dont highlight on red :)

Actual Behavior

parameters are highlighted with error:

Required attribute "key_name" not specified: An attribute named "key_name" is required hereTerraform
Unexpected attribute: An attribute named "key_vault_key_id" is not expected hereTerraform

Terraform Configuration

resource "azurerm_storage_account_customer_managed_key" "test" {
  storage_account_id = azurerm_storage_account.main.id
  key_vault_key_id   = azurerm_key_vault_key.customer_managed_key[0].id
}

Project Structure

Gist

No response

Anything Else?

Workarounds

No response

References

No response

Help Wanted

  • I'm interested in contributing a fix myself

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 other comments that do not add relevant new information or questions, 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions