ContainerStorageAccountArgs

data class ContainerStorageAccountArgs(val recoveryVaultName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val storageAccountId: Output<String>? = null) : ConvertibleToJava<ContainerStorageAccountArgs>

Manages registration of a storage account with Azure Backup. Storage accounts must be registered with an Azure Recovery Vault in order to backup file shares within the storage account. Registering a storage account with a vault creates what is known as a protection container within Azure Recovery Services. Once the container is created, Azure file shares within the storage account can be backed up using the azure.backup.ProtectedFileShare resource.

Example Usage

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.backup.ContainerStorageAccount;
import com.pulumi.azure.backup.ContainerStorageAccountArgs;
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()
.location("West Europe")
.build());
var vault = new Vault("vault", VaultArgs.builder()
.location(example.location())
.resourceGroupName(example.name())
.sku("Standard")
.build());
var sa = new Account("sa", AccountArgs.builder()
.location(example.location())
.resourceGroupName(example.name())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var container = new ContainerStorageAccount("container", ContainerStorageAccountArgs.builder()
.resourceGroupName(example.name())
.recoveryVaultName(vault.name())
.storageAccountId(sa.id())
.build());
}
}

Import

Backup Storage Account Containers can be imported using the resource id, e.g.

$ pulumi import azure:backup/containerStorageAccount:ContainerStorageAccount mycontainer "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/backupFabrics/Azure/protectionContainers/StorageContainer;storage;storage-rg-name;storage-account"

Note the ID requires quoting as there are semicolons

Constructors

Link copied to clipboard
fun ContainerStorageAccountArgs(recoveryVaultName: Output<String>? = null, resourceGroupName: Output<String>? = null, storageAccountId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): ContainerStorageAccountArgs

Properties

Link copied to clipboard
val recoveryVaultName: Output<String>? = null

The name of the vault where the storage account will be registered. Changing this forces a new resource to be created.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

Name of the resource group where the vault is located. Changing this forces a new resource to be created.

Link copied to clipboard
val storageAccountId: Output<String>? = null

The ID of the Storage Account to be registered Changing this forces a new resource to be created.