Skip to content

Commit

Permalink
Merge pull request #18 from clouddrove/Feature-53
Browse files Browse the repository at this point in the history
Feature 53
  • Loading branch information
d4kverma committed Apr 13, 2023
2 parents 98a175a + 7b8432c commit 1df5d14
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ resource "azurerm_role_assignment" "azurerm_disk_encryption_set_key_vault_access

resource "azurerm_key_vault_key" "example" {
count = var.enabled && var.enable_disk_encryption_set ? var.machine_count : 0
name = var.vm_addon_name ? format("vm-%s-vault-key-%s", module.labels.id, count.index + 1) : format("vm-%s-vault-key-%s", module.labels.id, var.vm_addon_name)
name = var.vm_addon_name == null ? format("vm-%s-vault-key-%s", module.labels.id, count.index + 1) : format("vm-%s-vault-key-%s", module.labels.id, var.vm_addon_name)
key_vault_id = var.key_vault_id
key_type = "RSA"
key_size = 2048
Expand All @@ -345,8 +345,8 @@ resource "azurerm_key_vault_access_policy" "main" {

key_vault_id = var.key_vault_id

tenant_id = azurerm_disk_encryption_set.example.*.identity.0.tenant_id
object_id = azurerm_disk_encryption_set.example.*.identity.0.principal_id
tenant_id = azurerm_disk_encryption_set.example[0].identity.0.tenant_id
object_id = azurerm_disk_encryption_set.example[0].identity.0.principal_id
key_permissions = [
"Create",
"Delete",
Expand Down Expand Up @@ -374,7 +374,7 @@ resource "azurerm_managed_disk" "data_disk" {
}
}

name = each.value.data_disk.name
name = format("%s-%s-managed-disk", module.labels.id, each.value.data_disk.name)
resource_group_name = var.resource_group_name
location = var.location
storage_account_type = lookup(each.value.data_disk, "storage_account_type", "StandardSSD_LRS")
Expand Down

0 comments on commit 1df5d14

Please sign in to comment.