We recommend using Azure Native.
azure.backup.ProtectedFileShare
Explore with Pulumi AI
Manages an Azure Backup Protected File Share to enable backups for file shares within an Azure Storage Account
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "tfex-recovery_vault",
location: "West Europe",
});
const vault = new azure.recoveryservices.Vault("vault", {
name: "tfex-recovery-vault",
location: example.location,
resourceGroupName: example.name,
sku: "Standard",
});
const sa = new azure.storage.Account("sa", {
name: "examplesa",
location: example.location,
resourceGroupName: example.name,
accountTier: "Standard",
accountReplicationType: "LRS",
});
const exampleShare = new azure.storage.Share("example", {
name: "example-share",
storageAccountName: sa.name,
quota: 1,
});
const protection_container = new azure.backup.ContainerStorageAccount("protection-container", {
resourceGroupName: example.name,
recoveryVaultName: vault.name,
storageAccountId: sa.id,
});
const examplePolicyFileShare = new azure.backup.PolicyFileShare("example", {
name: "tfex-recovery-vault-policy",
resourceGroupName: example.name,
recoveryVaultName: vault.name,
backup: {
frequency: "Daily",
time: "23:00",
},
retentionDaily: {
count: 10,
},
});
const share1 = new azure.backup.ProtectedFileShare("share1", {
resourceGroupName: example.name,
recoveryVaultName: vault.name,
sourceStorageAccountId: protection_container.storageAccountId,
sourceFileShareName: exampleShare.name,
backupPolicyId: examplePolicyFileShare.id,
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="tfex-recovery_vault",
location="West Europe")
vault = azure.recoveryservices.Vault("vault",
name="tfex-recovery-vault",
location=example.location,
resource_group_name=example.name,
sku="Standard")
sa = azure.storage.Account("sa",
name="examplesa",
location=example.location,
resource_group_name=example.name,
account_tier="Standard",
account_replication_type="LRS")
example_share = azure.storage.Share("example",
name="example-share",
storage_account_name=sa.name,
quota=1)
protection_container = azure.backup.ContainerStorageAccount("protection-container",
resource_group_name=example.name,
recovery_vault_name=vault.name,
storage_account_id=sa.id)
example_policy_file_share = azure.backup.PolicyFileShare("example",
name="tfex-recovery-vault-policy",
resource_group_name=example.name,
recovery_vault_name=vault.name,
backup={
"frequency": "Daily",
"time": "23:00",
},
retention_daily={
"count": 10,
})
share1 = azure.backup.ProtectedFileShare("share1",
resource_group_name=example.name,
recovery_vault_name=vault.name,
source_storage_account_id=protection_container.storage_account_id,
source_file_share_name=example_share.name,
backup_policy_id=example_policy_file_share.id)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/backup"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/recoveryservices"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("tfex-recovery_vault"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
vault, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{
Name: pulumi.String("tfex-recovery-vault"),
Location: example.Location,
ResourceGroupName: example.Name,
Sku: pulumi.String("Standard"),
})
if err != nil {
return err
}
sa, err := storage.NewAccount(ctx, "sa", &storage.AccountArgs{
Name: pulumi.String("examplesa"),
Location: example.Location,
ResourceGroupName: example.Name,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("LRS"),
})
if err != nil {
return err
}
exampleShare, err := storage.NewShare(ctx, "example", &storage.ShareArgs{
Name: pulumi.String("example-share"),
StorageAccountName: sa.Name,
Quota: pulumi.Int(1),
})
if err != nil {
return err
}
_, err = backup.NewContainerStorageAccount(ctx, "protection-container", &backup.ContainerStorageAccountArgs{
ResourceGroupName: example.Name,
RecoveryVaultName: vault.Name,
StorageAccountId: sa.ID(),
})
if err != nil {
return err
}
examplePolicyFileShare, err := backup.NewPolicyFileShare(ctx, "example", &backup.PolicyFileShareArgs{
Name: pulumi.String("tfex-recovery-vault-policy"),
ResourceGroupName: example.Name,
RecoveryVaultName: vault.Name,
Backup: &backup.PolicyFileShareBackupArgs{
Frequency: pulumi.String("Daily"),
Time: pulumi.String("23:00"),
},
RetentionDaily: &backup.PolicyFileShareRetentionDailyArgs{
Count: pulumi.Int(10),
},
})
if err != nil {
return err
}
_, err = backup.NewProtectedFileShare(ctx, "share1", &backup.ProtectedFileShareArgs{
ResourceGroupName: example.Name,
RecoveryVaultName: vault.Name,
SourceStorageAccountId: protection_container.StorageAccountId,
SourceFileShareName: exampleShare.Name,
BackupPolicyId: examplePolicyFileShare.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "tfex-recovery_vault",
Location = "West Europe",
});
var vault = new Azure.RecoveryServices.Vault("vault", new()
{
Name = "tfex-recovery-vault",
Location = example.Location,
ResourceGroupName = example.Name,
Sku = "Standard",
});
var sa = new Azure.Storage.Account("sa", new()
{
Name = "examplesa",
Location = example.Location,
ResourceGroupName = example.Name,
AccountTier = "Standard",
AccountReplicationType = "LRS",
});
var exampleShare = new Azure.Storage.Share("example", new()
{
Name = "example-share",
StorageAccountName = sa.Name,
Quota = 1,
});
var protection_container = new Azure.Backup.ContainerStorageAccount("protection-container", new()
{
ResourceGroupName = example.Name,
RecoveryVaultName = vault.Name,
StorageAccountId = sa.Id,
});
var examplePolicyFileShare = new Azure.Backup.PolicyFileShare("example", new()
{
Name = "tfex-recovery-vault-policy",
ResourceGroupName = example.Name,
RecoveryVaultName = vault.Name,
Backup = new Azure.Backup.Inputs.PolicyFileShareBackupArgs
{
Frequency = "Daily",
Time = "23:00",
},
RetentionDaily = new Azure.Backup.Inputs.PolicyFileShareRetentionDailyArgs
{
Count = 10,
},
});
var share1 = new Azure.Backup.ProtectedFileShare("share1", new()
{
ResourceGroupName = example.Name,
RecoveryVaultName = vault.Name,
SourceStorageAccountId = protection_container.StorageAccountId,
SourceFileShareName = exampleShare.Name,
BackupPolicyId = examplePolicyFileShare.Id,
});
});
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.recoveryservices.Vault;
import com.pulumi.azure.recoveryservices.VaultArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.Share;
import com.pulumi.azure.storage.ShareArgs;
import com.pulumi.azure.backup.ContainerStorageAccount;
import com.pulumi.azure.backup.ContainerStorageAccountArgs;
import com.pulumi.azure.backup.PolicyFileShare;
import com.pulumi.azure.backup.PolicyFileShareArgs;
import com.pulumi.azure.backup.inputs.PolicyFileShareBackupArgs;
import com.pulumi.azure.backup.inputs.PolicyFileShareRetentionDailyArgs;
import com.pulumi.azure.backup.ProtectedFileShare;
import com.pulumi.azure.backup.ProtectedFileShareArgs;
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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("tfex-recovery_vault")
.location("West Europe")
.build());
var vault = new Vault("vault", VaultArgs.builder()
.name("tfex-recovery-vault")
.location(example.location())
.resourceGroupName(example.name())
.sku("Standard")
.build());
var sa = new Account("sa", AccountArgs.builder()
.name("examplesa")
.location(example.location())
.resourceGroupName(example.name())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleShare = new Share("exampleShare", ShareArgs.builder()
.name("example-share")
.storageAccountName(sa.name())
.quota(1)
.build());
var protection_container = new ContainerStorageAccount("protection-container", ContainerStorageAccountArgs.builder()
.resourceGroupName(example.name())
.recoveryVaultName(vault.name())
.storageAccountId(sa.id())
.build());
var examplePolicyFileShare = new PolicyFileShare("examplePolicyFileShare", PolicyFileShareArgs.builder()
.name("tfex-recovery-vault-policy")
.resourceGroupName(example.name())
.recoveryVaultName(vault.name())
.backup(PolicyFileShareBackupArgs.builder()
.frequency("Daily")
.time("23:00")
.build())
.retentionDaily(PolicyFileShareRetentionDailyArgs.builder()
.count(10)
.build())
.build());
var share1 = new ProtectedFileShare("share1", ProtectedFileShareArgs.builder()
.resourceGroupName(example.name())
.recoveryVaultName(vault.name())
.sourceStorageAccountId(protection_container.storageAccountId())
.sourceFileShareName(exampleShare.name())
.backupPolicyId(examplePolicyFileShare.id())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: tfex-recovery_vault
location: West Europe
vault:
type: azure:recoveryservices:Vault
properties:
name: tfex-recovery-vault
location: ${example.location}
resourceGroupName: ${example.name}
sku: Standard
sa:
type: azure:storage:Account
properties:
name: examplesa
location: ${example.location}
resourceGroupName: ${example.name}
accountTier: Standard
accountReplicationType: LRS
exampleShare:
type: azure:storage:Share
name: example
properties:
name: example-share
storageAccountName: ${sa.name}
quota: 1
protection-container:
type: azure:backup:ContainerStorageAccount
properties:
resourceGroupName: ${example.name}
recoveryVaultName: ${vault.name}
storageAccountId: ${sa.id}
examplePolicyFileShare:
type: azure:backup:PolicyFileShare
name: example
properties:
name: tfex-recovery-vault-policy
resourceGroupName: ${example.name}
recoveryVaultName: ${vault.name}
backup:
frequency: Daily
time: 23:00
retentionDaily:
count: 10
share1:
type: azure:backup:ProtectedFileShare
properties:
resourceGroupName: ${example.name}
recoveryVaultName: ${vault.name}
sourceStorageAccountId: ${["protection-container"].storageAccountId}
sourceFileShareName: ${exampleShare.name}
backupPolicyId: ${examplePolicyFileShare.id}
Create ProtectedFileShare Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProtectedFileShare(name: string, args: ProtectedFileShareArgs, opts?: CustomResourceOptions);
@overload
def ProtectedFileShare(resource_name: str,
args: ProtectedFileShareArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProtectedFileShare(resource_name: str,
opts: Optional[ResourceOptions] = None,
backup_policy_id: Optional[str] = None,
recovery_vault_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
source_file_share_name: Optional[str] = None,
source_storage_account_id: Optional[str] = None)
func NewProtectedFileShare(ctx *Context, name string, args ProtectedFileShareArgs, opts ...ResourceOption) (*ProtectedFileShare, error)
public ProtectedFileShare(string name, ProtectedFileShareArgs args, CustomResourceOptions? opts = null)
public ProtectedFileShare(String name, ProtectedFileShareArgs args)
public ProtectedFileShare(String name, ProtectedFileShareArgs args, CustomResourceOptions options)
type: azure:backup:ProtectedFileShare
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ProtectedFileShareArgs
- 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 ProtectedFileShareArgs
- 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 ProtectedFileShareArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProtectedFileShareArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProtectedFileShareArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var protectedFileShareResource = new Azure.Backup.ProtectedFileShare("protectedFileShareResource", new()
{
BackupPolicyId = "string",
RecoveryVaultName = "string",
ResourceGroupName = "string",
SourceFileShareName = "string",
SourceStorageAccountId = "string",
});
example, err := backup.NewProtectedFileShare(ctx, "protectedFileShareResource", &backup.ProtectedFileShareArgs{
BackupPolicyId: pulumi.String("string"),
RecoveryVaultName: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
SourceFileShareName: pulumi.String("string"),
SourceStorageAccountId: pulumi.String("string"),
})
var protectedFileShareResource = new ProtectedFileShare("protectedFileShareResource", ProtectedFileShareArgs.builder()
.backupPolicyId("string")
.recoveryVaultName("string")
.resourceGroupName("string")
.sourceFileShareName("string")
.sourceStorageAccountId("string")
.build());
protected_file_share_resource = azure.backup.ProtectedFileShare("protectedFileShareResource",
backup_policy_id="string",
recovery_vault_name="string",
resource_group_name="string",
source_file_share_name="string",
source_storage_account_id="string")
const protectedFileShareResource = new azure.backup.ProtectedFileShare("protectedFileShareResource", {
backupPolicyId: "string",
recoveryVaultName: "string",
resourceGroupName: "string",
sourceFileShareName: "string",
sourceStorageAccountId: "string",
});
type: azure:backup:ProtectedFileShare
properties:
backupPolicyId: string
recoveryVaultName: string
resourceGroupName: string
sourceFileShareName: string
sourceStorageAccountId: string
ProtectedFileShare Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ProtectedFileShare resource accepts the following input properties:
- Backup
Policy stringId - Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported.
- Recovery
Vault stringName - Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created.
- string
- Specifies the name of the file share to backup. Changing this forces a new resource to be created.
- Source
Storage stringAccount Id Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created.
NOTE The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the
azure.backup.ContainerStorageAccount
resource or the Register-AzRecoveryServicesBackupContainer PowerShell cmdlet to register a storage account with a vault. When using theazure.backup.ContainerStorageAccount
resource to register, you can usedepends_on
to explicitly declare the dependency. It will make sure that the registration is completed before creating theazure.backup.ProtectedFileShare
resource.
- Backup
Policy stringId - Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported.
- Recovery
Vault stringName - Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created.
- string
- Specifies the name of the file share to backup. Changing this forces a new resource to be created.
- Source
Storage stringAccount Id Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created.
NOTE The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the
azure.backup.ContainerStorageAccount
resource or the Register-AzRecoveryServicesBackupContainer PowerShell cmdlet to register a storage account with a vault. When using theazure.backup.ContainerStorageAccount
resource to register, you can usedepends_on
to explicitly declare the dependency. It will make sure that the registration is completed before creating theazure.backup.ProtectedFileShare
resource.
- backup
Policy StringId - Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported.
- recovery
Vault StringName - Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created.
- String
- Specifies the name of the file share to backup. Changing this forces a new resource to be created.
- source
Storage StringAccount Id Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created.
NOTE The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the
azure.backup.ContainerStorageAccount
resource or the Register-AzRecoveryServicesBackupContainer PowerShell cmdlet to register a storage account with a vault. When using theazure.backup.ContainerStorageAccount
resource to register, you can usedepends_on
to explicitly declare the dependency. It will make sure that the registration is completed before creating theazure.backup.ProtectedFileShare
resource.
- backup
Policy stringId - Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported.
- recovery
Vault stringName - Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- resource
Group stringName - The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created.
- string
- Specifies the name of the file share to backup. Changing this forces a new resource to be created.
- source
Storage stringAccount Id Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created.
NOTE The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the
azure.backup.ContainerStorageAccount
resource or the Register-AzRecoveryServicesBackupContainer PowerShell cmdlet to register a storage account with a vault. When using theazure.backup.ContainerStorageAccount
resource to register, you can usedepends_on
to explicitly declare the dependency. It will make sure that the registration is completed before creating theazure.backup.ProtectedFileShare
resource.
- backup_
policy_ strid - Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported.
- recovery_
vault_ strname - Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- resource_
group_ strname - The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created.
- str
- Specifies the name of the file share to backup. Changing this forces a new resource to be created.
- source_
storage_ straccount_ id Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created.
NOTE The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the
azure.backup.ContainerStorageAccount
resource or the Register-AzRecoveryServicesBackupContainer PowerShell cmdlet to register a storage account with a vault. When using theazure.backup.ContainerStorageAccount
resource to register, you can usedepends_on
to explicitly declare the dependency. It will make sure that the registration is completed before creating theazure.backup.ProtectedFileShare
resource.
- backup
Policy StringId - Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported.
- recovery
Vault StringName - Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created.
- String
- Specifies the name of the file share to backup. Changing this forces a new resource to be created.
- source
Storage StringAccount Id Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created.
NOTE The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the
azure.backup.ContainerStorageAccount
resource or the Register-AzRecoveryServicesBackupContainer PowerShell cmdlet to register a storage account with a vault. When using theazure.backup.ContainerStorageAccount
resource to register, you can usedepends_on
to explicitly declare the dependency. It will make sure that the registration is completed before creating theazure.backup.ProtectedFileShare
resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProtectedFileShare 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 ProtectedFileShare Resource
Get an existing ProtectedFileShare 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?: ProtectedFileShareState, opts?: CustomResourceOptions): ProtectedFileShare
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backup_policy_id: Optional[str] = None,
recovery_vault_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
source_file_share_name: Optional[str] = None,
source_storage_account_id: Optional[str] = None) -> ProtectedFileShare
func GetProtectedFileShare(ctx *Context, name string, id IDInput, state *ProtectedFileShareState, opts ...ResourceOption) (*ProtectedFileShare, error)
public static ProtectedFileShare Get(string name, Input<string> id, ProtectedFileShareState? state, CustomResourceOptions? opts = null)
public static ProtectedFileShare get(String name, Output<String> id, ProtectedFileShareState 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 - Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported.
- Recovery
Vault stringName - Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created.
- string
- Specifies the name of the file share to backup. Changing this forces a new resource to be created.
- Source
Storage stringAccount Id Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created.
NOTE The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the
azure.backup.ContainerStorageAccount
resource or the Register-AzRecoveryServicesBackupContainer PowerShell cmdlet to register a storage account with a vault. When using theazure.backup.ContainerStorageAccount
resource to register, you can usedepends_on
to explicitly declare the dependency. It will make sure that the registration is completed before creating theazure.backup.ProtectedFileShare
resource.
- Backup
Policy stringId - Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported.
- Recovery
Vault stringName - Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created.
- string
- Specifies the name of the file share to backup. Changing this forces a new resource to be created.
- Source
Storage stringAccount Id Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created.
NOTE The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the
azure.backup.ContainerStorageAccount
resource or the Register-AzRecoveryServicesBackupContainer PowerShell cmdlet to register a storage account with a vault. When using theazure.backup.ContainerStorageAccount
resource to register, you can usedepends_on
to explicitly declare the dependency. It will make sure that the registration is completed before creating theazure.backup.ProtectedFileShare
resource.
- backup
Policy StringId - Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported.
- recovery
Vault StringName - Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created.
- String
- Specifies the name of the file share to backup. Changing this forces a new resource to be created.
- source
Storage StringAccount Id Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created.
NOTE The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the
azure.backup.ContainerStorageAccount
resource or the Register-AzRecoveryServicesBackupContainer PowerShell cmdlet to register a storage account with a vault. When using theazure.backup.ContainerStorageAccount
resource to register, you can usedepends_on
to explicitly declare the dependency. It will make sure that the registration is completed before creating theazure.backup.ProtectedFileShare
resource.
- backup
Policy stringId - Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported.
- recovery
Vault stringName - Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- resource
Group stringName - The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created.
- string
- Specifies the name of the file share to backup. Changing this forces a new resource to be created.
- source
Storage stringAccount Id Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created.
NOTE The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the
azure.backup.ContainerStorageAccount
resource or the Register-AzRecoveryServicesBackupContainer PowerShell cmdlet to register a storage account with a vault. When using theazure.backup.ContainerStorageAccount
resource to register, you can usedepends_on
to explicitly declare the dependency. It will make sure that the registration is completed before creating theazure.backup.ProtectedFileShare
resource.
- backup_
policy_ strid - Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported.
- recovery_
vault_ strname - Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- resource_
group_ strname - The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created.
- str
- Specifies the name of the file share to backup. Changing this forces a new resource to be created.
- source_
storage_ straccount_ id Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created.
NOTE The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the
azure.backup.ContainerStorageAccount
resource or the Register-AzRecoveryServicesBackupContainer PowerShell cmdlet to register a storage account with a vault. When using theazure.backup.ContainerStorageAccount
resource to register, you can usedepends_on
to explicitly declare the dependency. It will make sure that the registration is completed before creating theazure.backup.ProtectedFileShare
resource.
- backup
Policy StringId - Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported.
- recovery
Vault StringName - Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created.
- String
- Specifies the name of the file share to backup. Changing this forces a new resource to be created.
- source
Storage StringAccount Id Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created.
NOTE The storage account must already be registered with the recovery vault in order to backup shares within the account. You can use the
azure.backup.ContainerStorageAccount
resource or the Register-AzRecoveryServicesBackupContainer PowerShell cmdlet to register a storage account with a vault. When using theazure.backup.ContainerStorageAccount
resource to register, you can usedepends_on
to explicitly declare the dependency. It will make sure that the registration is completed before creating theazure.backup.ProtectedFileShare
resource.
Import
Azure Backup Protected File Shares can be imported using the resource id
, e.g.
$ pulumi import azure:backup/protectedFileShare:ProtectedFileShare item1 "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.RecoveryServices/vaults/example-recovery-vault/backupFabrics/Azure/protectionContainers/StorageContainer;storage;group2;example-storage-account/protectedItems/AzureFileShare;3f6e3108a45793581bcbd1c61c87a3b2ceeb4ff4bc02a95ce9d1022b23722935"
-> NOTE The ID requires quoting as there are semicolons. This user unfriendly ID can be found in the Deployments of the used resourcegroup, look for an Deployment which starts with ConfigureAFSProtection-
, click then Go to resource
.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.