Skip to content

Commit

Permalink
key-vault rbac added
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol Nagpal committed Feb 10, 2023
1 parent fc761e0 commit 32e6cf5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,13 @@ resource "azurerm_disk_encryption_set" "main" {
}
}

resource "azurerm_role_assignment" "azurerm_disk_encryption_set_key_vault_access" {
count = var.enabled && var.azurerm_disk_encryption_set ? 1 : 0
principal_id = azurerm_disk_encryption_set.main[0].identity.0.principal_id
scope = var.key_vault_id
role_definition_name = "Key Vault Crypto Service Encryption User"
}

resource "azurerm_key_vault_access_policy" "main" {
count = var.enabled && var.azurerm_disk_encryption_set ? 1 : 0

Expand Down

0 comments on commit 32e6cf5

Please sign in to comment.