resource "azurerm_key_vault" "${MyResource}" {
         name = "testvault"
         location = "West US"
         resource_group_name = "${azurerm_resource_group.test.name}"
      
         sku {
             name = "standard"
         }
      
         tenant_id = "d6e396d0-5584-41dc-9fc0-268df99bc610"
      
         access_policy {
             tenant_id = "d6e396d0-5584-41dc-9fc0-268df99bc610"
             object_id = "d746815a-0433-4a21-b95d-fc437d2d475b"
             key_permissions = [
                 "all"
             ]
             secret_permissions = [
                 "get"
             ]
         }
      
         enabled_for_disk_encryption = true
      }
      Terraform language logo

      azurerm_key_vault

      Terraform snippets

      The resource "azurerm_key_vault" will create and manage a key vault for the application. The key vault must be created in a location specified in the "location" key value. The key vault's name must be specified in the "name" key value. The key vault's resource group must be specified in the "resource_group_name" key value.

      The key vault must be enabled for disk encryption. This can be specified in the "enabled_for_disk_encryption" key value to be true or false.

      Shortcut: tf_azurerm_key_vault

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.