Data Source: azurerm_key_vault_secrets

Use this data source to retrieve a list of secret names from an existing Key Vault Secret.

Example Usage

data "azurerm_key_vault_secrets" "example" {
  key_vault_id = data.azurerm_key_vault.existing.id
}

data "azurerm_key_vault_secret" "example" {
  for_each     = toset(data.azurerm_key_vault_secrets.example.names)
  name         = each.key
  key_vault_id = data.azurerm_key_vault.existing.id
}

Argument Reference

The following arguments are supported:

NOTE: The vault must be in the same subscription as the provider. If the vault is in another subscription, you must create an aliased provider for that subscription.

Attributes Reference

In addition to the Argument listed above - the following Attributes are exported:


A secrets block supports following:

Timeouts

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