We recommend using Azure Native.
azure.dataprotection.BackupInstanceBlogStorage
Explore with Pulumi AI
Manages a Backup Instance Blob Storage.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
{
Location = "West Europe",
});
var exampleAccount = new Azure.Storage.Account("exampleAccount", new()
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
});
var exampleBackupVault = new Azure.DataProtection.BackupVault("exampleBackupVault", new()
{
ResourceGroupName = exampleResourceGroup.Name,
Location = exampleResourceGroup.Location,
DatastoreType = "VaultStore",
Redundancy = "LocallyRedundant",
Identity = new Azure.DataProtection.Inputs.BackupVaultIdentityArgs
{
Type = "SystemAssigned",
},
});
var exampleAssignment = new Azure.Authorization.Assignment("exampleAssignment", new()
{
Scope = exampleAccount.Id,
RoleDefinitionName = "Storage Account Backup Contributor",
PrincipalId = exampleBackupVault.Identity.Apply(identity => identity?.PrincipalId),
});
var exampleBackupPolicyBlobStorage = new Azure.DataProtection.BackupPolicyBlobStorage("exampleBackupPolicyBlobStorage", new()
{
VaultId = exampleBackupVault.Id,
RetentionDuration = "P30D",
});
var exampleBackupInstanceBlogStorage = new Azure.DataProtection.BackupInstanceBlogStorage("exampleBackupInstanceBlogStorage", new()
{
VaultId = exampleBackupVault.Id,
Location = exampleResourceGroup.Location,
StorageAccountId = exampleAccount.Id,
BackupPolicyId = exampleBackupPolicyBlobStorage.Id,
}, new CustomResourceOptions
{
DependsOn = new[]
{
exampleAssignment,
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/authorization"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/dataprotection"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("LRS"),
})
if err != nil {
return err
}
exampleBackupVault, err := dataprotection.NewBackupVault(ctx, "exampleBackupVault", &dataprotection.BackupVaultArgs{
ResourceGroupName: exampleResourceGroup.Name,
Location: exampleResourceGroup.Location,
DatastoreType: pulumi.String("VaultStore"),
Redundancy: pulumi.String("LocallyRedundant"),
Identity: &dataprotection.BackupVaultIdentityArgs{
Type: pulumi.String("SystemAssigned"),
},
})
if err != nil {
return err
}
exampleAssignment, err := authorization.NewAssignment(ctx, "exampleAssignment", &authorization.AssignmentArgs{
Scope: exampleAccount.ID(),
RoleDefinitionName: pulumi.String("Storage Account Backup Contributor"),
PrincipalId: exampleBackupVault.Identity.ApplyT(func(identity dataprotection.BackupVaultIdentity) (*string, error) {
return &identity.PrincipalId, nil
}).(pulumi.StringPtrOutput),
})
if err != nil {
return err
}
exampleBackupPolicyBlobStorage, err := dataprotection.NewBackupPolicyBlobStorage(ctx, "exampleBackupPolicyBlobStorage", &dataprotection.BackupPolicyBlobStorageArgs{
VaultId: exampleBackupVault.ID(),
RetentionDuration: pulumi.String("P30D"),
})
if err != nil {
return err
}
_, err = dataprotection.NewBackupInstanceBlogStorage(ctx, "exampleBackupInstanceBlogStorage", &dataprotection.BackupInstanceBlogStorageArgs{
VaultId: exampleBackupVault.ID(),
Location: exampleResourceGroup.Location,
StorageAccountId: exampleAccount.ID(),
BackupPolicyId: exampleBackupPolicyBlobStorage.ID(),
}, pulumi.DependsOn([]pulumi.Resource{
exampleAssignment,
}))
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.dataprotection.BackupVault;
import com.pulumi.azure.dataprotection.BackupVaultArgs;
import com.pulumi.azure.dataprotection.inputs.BackupVaultIdentityArgs;
import com.pulumi.azure.authorization.Assignment;
import com.pulumi.azure.authorization.AssignmentArgs;
import com.pulumi.azure.dataprotection.BackupPolicyBlobStorage;
import com.pulumi.azure.dataprotection.BackupPolicyBlobStorageArgs;
import com.pulumi.azure.dataprotection.BackupInstanceBlogStorage;
import com.pulumi.azure.dataprotection.BackupInstanceBlogStorageArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleBackupVault = new BackupVault("exampleBackupVault", BackupVaultArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.datastoreType("VaultStore")
.redundancy("LocallyRedundant")
.identity(BackupVaultIdentityArgs.builder()
.type("SystemAssigned")
.build())
.build());
var exampleAssignment = new Assignment("exampleAssignment", AssignmentArgs.builder()
.scope(exampleAccount.id())
.roleDefinitionName("Storage Account Backup Contributor")
.principalId(exampleBackupVault.identity().applyValue(identity -> identity.principalId()))
.build());
var exampleBackupPolicyBlobStorage = new BackupPolicyBlobStorage("exampleBackupPolicyBlobStorage", BackupPolicyBlobStorageArgs.builder()
.vaultId(exampleBackupVault.id())
.retentionDuration("P30D")
.build());
var exampleBackupInstanceBlogStorage = new BackupInstanceBlogStorage("exampleBackupInstanceBlogStorage", BackupInstanceBlogStorageArgs.builder()
.vaultId(exampleBackupVault.id())
.location(exampleResourceGroup.location())
.storageAccountId(exampleAccount.id())
.backupPolicyId(exampleBackupPolicyBlobStorage.id())
.build(), CustomResourceOptions.builder()
.dependsOn(exampleAssignment)
.build());
}
}
import pulumi
import pulumi_azure as azure
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_account = azure.storage.Account("exampleAccount",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
account_tier="Standard",
account_replication_type="LRS")
example_backup_vault = azure.dataprotection.BackupVault("exampleBackupVault",
resource_group_name=example_resource_group.name,
location=example_resource_group.location,
datastore_type="VaultStore",
redundancy="LocallyRedundant",
identity=azure.dataprotection.BackupVaultIdentityArgs(
type="SystemAssigned",
))
example_assignment = azure.authorization.Assignment("exampleAssignment",
scope=example_account.id,
role_definition_name="Storage Account Backup Contributor",
principal_id=example_backup_vault.identity.principal_id)
example_backup_policy_blob_storage = azure.dataprotection.BackupPolicyBlobStorage("exampleBackupPolicyBlobStorage",
vault_id=example_backup_vault.id,
retention_duration="P30D")
example_backup_instance_blog_storage = azure.dataprotection.BackupInstanceBlogStorage("exampleBackupInstanceBlogStorage",
vault_id=example_backup_vault.id,
location=example_resource_group.location,
storage_account_id=example_account.id,
backup_policy_id=example_backup_policy_blob_storage.id,
opts=pulumi.ResourceOptions(depends_on=[example_assignment]))
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAccount = new azure.storage.Account("exampleAccount", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
accountTier: "Standard",
accountReplicationType: "LRS",
});
const exampleBackupVault = new azure.dataprotection.BackupVault("exampleBackupVault", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
datastoreType: "VaultStore",
redundancy: "LocallyRedundant",
identity: {
type: "SystemAssigned",
},
});
const exampleAssignment = new azure.authorization.Assignment("exampleAssignment", {
scope: exampleAccount.id,
roleDefinitionName: "Storage Account Backup Contributor",
principalId: exampleBackupVault.identity.apply(identity => identity?.principalId),
});
const exampleBackupPolicyBlobStorage = new azure.dataprotection.BackupPolicyBlobStorage("exampleBackupPolicyBlobStorage", {
vaultId: exampleBackupVault.id,
retentionDuration: "P30D",
});
const exampleBackupInstanceBlogStorage = new azure.dataprotection.BackupInstanceBlogStorage("exampleBackupInstanceBlogStorage", {
vaultId: exampleBackupVault.id,
location: exampleResourceGroup.location,
storageAccountId: exampleAccount.id,
backupPolicyId: exampleBackupPolicyBlobStorage.id,
}, {
dependsOn: [exampleAssignment],
});
resources:
exampleResourceGroup:
type: azure:core:ResourceGroup
properties:
location: West Europe
exampleAccount:
type: azure:storage:Account
properties:
resourceGroupName: ${exampleResourceGroup.name}
location: ${exampleResourceGroup.location}
accountTier: Standard
accountReplicationType: LRS
exampleBackupVault:
type: azure:dataprotection:BackupVault
properties:
resourceGroupName: ${exampleResourceGroup.name}
location: ${exampleResourceGroup.location}
datastoreType: VaultStore
redundancy: LocallyRedundant
identity:
type: SystemAssigned
exampleAssignment:
type: azure:authorization:Assignment
properties:
scope: ${exampleAccount.id}
roleDefinitionName: Storage Account Backup Contributor
principalId: ${exampleBackupVault.identity.principalId}
exampleBackupPolicyBlobStorage:
type: azure:dataprotection:BackupPolicyBlobStorage
properties:
vaultId: ${exampleBackupVault.id}
retentionDuration: P30D
exampleBackupInstanceBlogStorage:
type: azure:dataprotection:BackupInstanceBlogStorage
properties:
vaultId: ${exampleBackupVault.id}
location: ${exampleResourceGroup.location}
storageAccountId: ${exampleAccount.id}
backupPolicyId: ${exampleBackupPolicyBlobStorage.id}
options:
dependson:
- ${exampleAssignment}
Create BackupInstanceBlogStorage Resource
new BackupInstanceBlogStorage(name: string, args: BackupInstanceBlogStorageArgs, opts?: CustomResourceOptions);
@overload
def BackupInstanceBlogStorage(resource_name: str,
opts: Optional[ResourceOptions] = None,
backup_policy_id: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
storage_account_id: Optional[str] = None,
vault_id: Optional[str] = None)
@overload
def BackupInstanceBlogStorage(resource_name: str,
args: BackupInstanceBlogStorageArgs,
opts: Optional[ResourceOptions] = None)
func NewBackupInstanceBlogStorage(ctx *Context, name string, args BackupInstanceBlogStorageArgs, opts ...ResourceOption) (*BackupInstanceBlogStorage, error)
public BackupInstanceBlogStorage(string name, BackupInstanceBlogStorageArgs args, CustomResourceOptions? opts = null)
public BackupInstanceBlogStorage(String name, BackupInstanceBlogStorageArgs args)
public BackupInstanceBlogStorage(String name, BackupInstanceBlogStorageArgs args, CustomResourceOptions options)
type: azure:dataprotection:BackupInstanceBlogStorage
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BackupInstanceBlogStorageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args BackupInstanceBlogStorageArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args BackupInstanceBlogStorageArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BackupInstanceBlogStorageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BackupInstanceBlogStorageArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
BackupInstanceBlogStorage Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The BackupInstanceBlogStorage resource accepts the following input properties:
- Backup
Policy stringId The ID of the Backup Policy.
- Storage
Account stringId The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- Vault
Id string The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created.
- Location string
The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- Name string
The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created.
- Backup
Policy stringId The ID of the Backup Policy.
- Storage
Account stringId The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- Vault
Id string The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created.
- Location string
The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- Name string
The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created.
- backup
Policy StringId The ID of the Backup Policy.
- storage
Account StringId The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- vault
Id String The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created.
- location String
The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- name String
The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created.
- backup
Policy stringId The ID of the Backup Policy.
- storage
Account stringId The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- vault
Id string The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created.
- location string
The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- name string
The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created.
- backup_
policy_ strid The ID of the Backup Policy.
- storage_
account_ strid The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- vault_
id str The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created.
- location str
The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- name str
The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created.
- backup
Policy StringId The ID of the Backup Policy.
- storage
Account StringId The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- vault
Id String The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created.
- location String
The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- name String
The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the BackupInstanceBlogStorage resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing BackupInstanceBlogStorage Resource
Get an existing BackupInstanceBlogStorage resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: BackupInstanceBlogStorageState, opts?: CustomResourceOptions): BackupInstanceBlogStorage
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backup_policy_id: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
storage_account_id: Optional[str] = None,
vault_id: Optional[str] = None) -> BackupInstanceBlogStorage
func GetBackupInstanceBlogStorage(ctx *Context, name string, id IDInput, state *BackupInstanceBlogStorageState, opts ...ResourceOption) (*BackupInstanceBlogStorage, error)
public static BackupInstanceBlogStorage Get(string name, Input<string> id, BackupInstanceBlogStorageState? state, CustomResourceOptions? opts = null)
public static BackupInstanceBlogStorage get(String name, Output<String> id, BackupInstanceBlogStorageState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Backup
Policy stringId The ID of the Backup Policy.
- Location string
The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- Name string
The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created.
- Storage
Account stringId The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- Vault
Id string The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created.
- Backup
Policy stringId The ID of the Backup Policy.
- Location string
The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- Name string
The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created.
- Storage
Account stringId The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- Vault
Id string The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created.
- backup
Policy StringId The ID of the Backup Policy.
- location String
The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- name String
The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created.
- storage
Account StringId The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- vault
Id String The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created.
- backup
Policy stringId The ID of the Backup Policy.
- location string
The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- name string
The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created.
- storage
Account stringId The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- vault
Id string The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created.
- backup_
policy_ strid The ID of the Backup Policy.
- location str
The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- name str
The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created.
- storage_
account_ strid The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- vault_
id str The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created.
- backup
Policy StringId The ID of the Backup Policy.
- location String
The location of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- name String
The name which should be used for this Backup Instance Blob Storage. Changing this forces a new Backup Instance Blob Storage to be created.
- storage
Account StringId The ID of the source Storage Account. Changing this forces a new Backup Instance Blob Storage to be created.
- vault
Id String The ID of the Backup Vault within which the Backup Instance Blob Storage should exist. Changing this forces a new Backup Instance Blob Storage to be created.
Import
Backup Instance Blob Storages can be imported using the resource id
, e.g.
$ pulumi import azure:dataprotection/backupInstanceBlogStorage:BackupInstanceBlogStorage example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1/backupInstances/backupInstance1
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.