azurerm_key_vault

    0

    0

    lucycodes42

    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

    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
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.