azurestack_key_vault

Manages a Key Vault.

Disclaimers

Example Usage

provider "azurestack" {
  features {}
}

data "azurestack_client_config" "current" {}

resource "azurestack_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurestack_key_vault" "example" {
  name                        = "examplekeyvault"
  location                    = azurestack_resource_group.example.location
  resource_group_name         = azurestack_resource_group.example.name
  enabled_for_disk_encryption = true
  tenant_id                   = data.azurestack_client_config.current.tenant_id

  sku_name = "standard"

  access_policy {
    tenant_id = data.azurestack_client_config.current.tenant_id
    object_id = data.azurestack_client_config.current.object_id

    key_permissions = [
      "Get",
    ]

    secret_permissions = [
      "Get",
    ]

    storage_permissions = [
      "Get",
    ]
  }
}

Argument Reference

The following arguments are supported:



A access_policy block supports the following:


A network_acls block supports the following:


Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

Key Vault's can be imported using the resource id, e.g.

terraform import azurestack_key_vault.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.KeyVault/vaults/vault1