1. Packages
  2. Packages
  3. Azure Classic
  4. API Docs
  5. dataprotection
  6. getBackupVault

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Use this data source to access information about an existing Backup Vault.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var example = Output.Create(Azure.DataProtection.GetBackupVault.InvokeAsync(new Azure.DataProtection.GetBackupVaultArgs
            {
                Name = "existing-backup-vault",
                ResourceGroupName = "existing-resource-group",
            }));
            this.AzurermDataProtectionBackupVaultId = data.Azurerm_vpn_gateway.Example.Id;
            this.AzurermDataProtectionBackupVaultPrincipalId = example.Apply(example => example.Identities?[0]?.PrincipalId);
        }
    
        [Output("azurermDataProtectionBackupVaultId")]
        public Output<string> AzurermDataProtectionBackupVaultId { get; set; }
        [Output("azurermDataProtectionBackupVaultPrincipalId")]
        public Output<string> AzurermDataProtectionBackupVaultPrincipalId { get; set; }
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/dataprotection"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := dataprotection.LookupBackupVault(ctx, &dataprotection.LookupBackupVaultArgs{
    			Name:              "existing-backup-vault",
    			ResourceGroupName: "existing-resource-group",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("azurermDataProtectionBackupVaultId", data.Azurerm_vpn_gateway.Example.Id)
    		ctx.Export("azurermDataProtectionBackupVaultPrincipalId", example.Identities[0].PrincipalId)
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.dataprotection.getBackupVault({
        name: "existing-backup-vault",
        resourceGroupName: "existing-resource-group",
    });
    export const azurermDataProtectionBackupVaultId = data.azurerm_vpn_gateway.example.id;
    export const azurermDataProtectionBackupVaultPrincipalId = example.then(example => example.identities?[0]?.principalId);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.dataprotection.get_backup_vault(name="existing-backup-vault",
        resource_group_name="existing-resource-group")
    pulumi.export("azurermDataProtectionBackupVaultId", data["azurerm_vpn_gateway"]["example"]["id"])
    pulumi.export("azurermDataProtectionBackupVaultPrincipalId", example.identities[0].principal_id)
    

    Example coming soon!

    Using getBackupVault

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getBackupVault(args: GetBackupVaultArgs, opts?: InvokeOptions): Promise<GetBackupVaultResult>
    function getBackupVaultOutput(args: GetBackupVaultOutputArgs, opts?: InvokeOptions): Output<GetBackupVaultResult>
    def get_backup_vault(name: Optional[str] = None,
                         resource_group_name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetBackupVaultResult
    def get_backup_vault_output(name: Optional[pulumi.Input[str]] = None,
                         resource_group_name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetBackupVaultResult]
    func LookupBackupVault(ctx *Context, args *LookupBackupVaultArgs, opts ...InvokeOption) (*LookupBackupVaultResult, error)
    func LookupBackupVaultOutput(ctx *Context, args *LookupBackupVaultOutputArgs, opts ...InvokeOption) LookupBackupVaultResultOutput

    > Note: This function is named LookupBackupVault in the Go SDK.

    public static class GetBackupVault 
    {
        public static Task<GetBackupVaultResult> InvokeAsync(GetBackupVaultArgs args, InvokeOptions? opts = null)
        public static Output<GetBackupVaultResult> Invoke(GetBackupVaultInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBackupVaultResult> getBackupVault(GetBackupVaultArgs args, InvokeOptions options)
    public static Output<GetBackupVaultResult> getBackupVault(GetBackupVaultArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure:dataprotection/getBackupVault:getBackupVault
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Specifies the name of the Backup Vault.
    ResourceGroupName string
    The name of the Resource Group where the Backup Vault exists.
    Name string
    Specifies the name of the Backup Vault.
    ResourceGroupName string
    The name of the Resource Group where the Backup Vault exists.
    name String
    Specifies the name of the Backup Vault.
    resourceGroupName String
    The name of the Resource Group where the Backup Vault exists.
    name string
    Specifies the name of the Backup Vault.
    resourceGroupName string
    The name of the Resource Group where the Backup Vault exists.
    name str
    Specifies the name of the Backup Vault.
    resource_group_name str
    The name of the Resource Group where the Backup Vault exists.
    name String
    Specifies the name of the Backup Vault.
    resourceGroupName String
    The name of the Resource Group where the Backup Vault exists.

    getBackupVault Result

    The following output properties are available:

    DatastoreType string
    Specifies the type of the data store.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identities List<GetBackupVaultIdentity>
    A identity block as defined below.
    Location string
    The Azure Region where the Backup Vault exists.
    Name string
    Redundancy string
    Specifies the backup storage redundancy.
    ResourceGroupName string
    Tags Dictionary<string, string>
    A mapping of tags which are assigned to the Backup Vault.
    DatastoreType string
    Specifies the type of the data store.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identities []GetBackupVaultIdentity
    A identity block as defined below.
    Location string
    The Azure Region where the Backup Vault exists.
    Name string
    Redundancy string
    Specifies the backup storage redundancy.
    ResourceGroupName string
    Tags map[string]string
    A mapping of tags which are assigned to the Backup Vault.
    datastoreType String
    Specifies the type of the data store.
    id String
    The provider-assigned unique ID for this managed resource.
    identities List<GetBackupVaultIdentity>
    A identity block as defined below.
    location String
    The Azure Region where the Backup Vault exists.
    name String
    redundancy String
    Specifies the backup storage redundancy.
    resourceGroupName String
    tags Map<String,String>
    A mapping of tags which are assigned to the Backup Vault.
    datastoreType string
    Specifies the type of the data store.
    id string
    The provider-assigned unique ID for this managed resource.
    identities GetBackupVaultIdentity[]
    A identity block as defined below.
    location string
    The Azure Region where the Backup Vault exists.
    name string
    redundancy string
    Specifies the backup storage redundancy.
    resourceGroupName string
    tags {[key: string]: string}
    A mapping of tags which are assigned to the Backup Vault.
    datastore_type str
    Specifies the type of the data store.
    id str
    The provider-assigned unique ID for this managed resource.
    identities Sequence[GetBackupVaultIdentity]
    A identity block as defined below.
    location str
    The Azure Region where the Backup Vault exists.
    name str
    redundancy str
    Specifies the backup storage redundancy.
    resource_group_name str
    tags Mapping[str, str]
    A mapping of tags which are assigned to the Backup Vault.
    datastoreType String
    Specifies the type of the data store.
    id String
    The provider-assigned unique ID for this managed resource.
    identities List<Property Map>
    A identity block as defined below.
    location String
    The Azure Region where the Backup Vault exists.
    name String
    redundancy String
    Specifies the backup storage redundancy.
    resourceGroupName String
    tags Map<String>
    A mapping of tags which are assigned to the Backup Vault.

    Supporting Types

    GetBackupVaultIdentity

    PrincipalId string
    The Principal ID for the Service Principal associated with the Identity of this Backup Vault.
    TenantId string
    The Tenant ID for the Service Principal associated with the Identity of this Backup Vault.
    Type string
    Specifies the identity type of the Backup Vault.
    PrincipalId string
    The Principal ID for the Service Principal associated with the Identity of this Backup Vault.
    TenantId string
    The Tenant ID for the Service Principal associated with the Identity of this Backup Vault.
    Type string
    Specifies the identity type of the Backup Vault.
    principalId String
    The Principal ID for the Service Principal associated with the Identity of this Backup Vault.
    tenantId String
    The Tenant ID for the Service Principal associated with the Identity of this Backup Vault.
    type String
    Specifies the identity type of the Backup Vault.
    principalId string
    The Principal ID for the Service Principal associated with the Identity of this Backup Vault.
    tenantId string
    The Tenant ID for the Service Principal associated with the Identity of this Backup Vault.
    type string
    Specifies the identity type of the Backup Vault.
    principal_id str
    The Principal ID for the Service Principal associated with the Identity of this Backup Vault.
    tenant_id str
    The Tenant ID for the Service Principal associated with the Identity of this Backup Vault.
    type str
    Specifies the identity type of the Backup Vault.
    principalId String
    The Principal ID for the Service Principal associated with the Identity of this Backup Vault.
    tenantId String
    The Tenant ID for the Service Principal associated with the Identity of this Backup Vault.
    type String
    Specifies the identity type of the Backup Vault.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial