Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
@azure/provisioning-keyvault provides typed Azure Key Vault resources for authoring pre-deployment infrastructure definitions.
Creating or editing these definitions does not create or modify live Azure resources.
Getting started
Install the service library and the core authoring library with npm:
npm install @azure/provisioning-keyvault @azure/provisioning-core
import { Stack } from "@azure/provisioning-core";
import { KeyVault, Secret } from "@azure/provisioning-keyvault";
const stack = new Stack("keyvault", {
targetScope: "resourceGroup",
location: "eastus",
});
const vault = new KeyVault(stack, {
properties: {
tenantId: "00000000-0000-0000-0000-000000000000",
sku: { family: "A", name: "standard" },
},
});
new Secret(vault, {
name: "connection-string",
properties: { value: "example" },
});
- Create a
Stackusing@azure/provisioning-coreand define the resource's parent context. - Import resource classes from
@azure/provisioning-keyvaultand add them to your definition with their required properties. - Serialize the definition using
@azure/provisioning-core/serialization.
See the core library documentation for the authoring model and serialization APIs.
Resource types
Resource classes are exported from @azure/provisioning-keyvault.
Shared model, input, and view types are available from @azure/provisioning-keyvault/types.
Use existing: true in resource constructor properties to reference an existing resource instead of declaring a new one.
License
This library is licensed under the MIT License.
Azure SDK for JavaScript