ProtectionContainer

Manages a Azure Site Recovery protection container. Protection containers serve as containers for replicated VMs and belong to a single region / recovery fabric. Protection containers can contain more than one replicated VM. To replicate a VM, a container must exist in both the source and target Azure regions.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var primary = new Azure.Core.ResourceGroup("primary", new Azure.Core.ResourceGroupArgs
        {
            Location = "West US",
        });
        var secondary = new Azure.Core.ResourceGroup("secondary", new Azure.Core.ResourceGroupArgs
        {
            Location = "East US",
        });
        var vault = new Azure.RecoveryServices.Vault("vault", new Azure.RecoveryServices.VaultArgs
        {
            Location = secondary.Location,
            ResourceGroupName = secondary.Name,
            Sku = "Standard",
        });
        var fabric = new Azure.SiteRecovery.Fabric("fabric", new Azure.SiteRecovery.FabricArgs
        {
            ResourceGroupName = secondary.Name,
            RecoveryVaultName = vault.Name,
            Location = primary.Location,
        });
        var protection_container = new Azure.SiteRecovery.ProtectionContainer("protection-container", new Azure.SiteRecovery.ProtectionContainerArgs
        {
            ResourceGroupName = secondary.Name,
            RecoveryVaultName = vault.Name,
            RecoveryFabricName = fabric.Name,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/recoveryservices"
    "github.com/pulumi/pulumi-azure/sdk/v3/go/azure/siterecovery"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        primary, err := core.NewResourceGroup(ctx, "primary", &core.ResourceGroupArgs{
            Location: pulumi.String("West US"),
        })
        if err != nil {
            return err
        }
        secondary, err := core.NewResourceGroup(ctx, "secondary", &core.ResourceGroupArgs{
            Location: pulumi.String("East US"),
        })
        if err != nil {
            return err
        }
        vault, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{
            Location:          secondary.Location,
            ResourceGroupName: secondary.Name,
            Sku:               pulumi.String("Standard"),
        })
        if err != nil {
            return err
        }
        fabric, err := siterecovery.NewFabric(ctx, "fabric", &siterecovery.FabricArgs{
            ResourceGroupName: secondary.Name,
            RecoveryVaultName: vault.Name,
            Location:          primary.Location,
        })
        if err != nil {
            return err
        }
        _, err = siterecovery.NewProtectionContainer(ctx, "protection-container", &siterecovery.ProtectionContainerArgs{
            ResourceGroupName:  secondary.Name,
            RecoveryVaultName:  vault.Name,
            RecoveryFabricName: fabric.Name,
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_azure as azure

primary = azure.core.ResourceGroup("primary", location="West US")
secondary = azure.core.ResourceGroup("secondary", location="East US")
vault = azure.recoveryservices.Vault("vault",
    location=secondary.location,
    resource_group_name=secondary.name,
    sku="Standard")
fabric = azure.siterecovery.Fabric("fabric",
    resource_group_name=secondary.name,
    recovery_vault_name=vault.name,
    location=primary.location)
protection_container = azure.siterecovery.ProtectionContainer("protection-container",
    resource_group_name=secondary.name,
    recovery_vault_name=vault.name,
    recovery_fabric_name=fabric.name)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const primary = new azure.core.ResourceGroup("primary", {location: "West US"});
const secondary = new azure.core.ResourceGroup("secondary", {location: "East US"});
const vault = new azure.recoveryservices.Vault("vault", {
    location: secondary.location,
    resourceGroupName: secondary.name,
    sku: "Standard",
});
const fabric = new azure.siterecovery.Fabric("fabric", {
    resourceGroupName: secondary.name,
    recoveryVaultName: vault.name,
    location: primary.location,
});
const protection_container = new azure.siterecovery.ProtectionContainer("protection-container", {
    resourceGroupName: secondary.name,
    recoveryVaultName: vault.name,
    recoveryFabricName: fabric.name,
});

Create a ProtectionContainer Resource

def ProtectionContainer(resource_name, opts=None, name=None, recovery_fabric_name=None, recovery_vault_name=None, resource_group_name=None, __props__=None);
name string
The unique name of the resource.
args ProtectionContainerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ProtectionContainerArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ProtectionContainerArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ProtectionContainer Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ProtectionContainer resource accepts the following input properties:

RecoveryFabricName string

Name of fabric that should contain this protection container.

RecoveryVaultName string

The name of the vault that should be updated.

ResourceGroupName string

Name of the resource group where the vault that should be updated is located.

Name string

The name of the network mapping.

RecoveryFabricName string

Name of fabric that should contain this protection container.

RecoveryVaultName string

The name of the vault that should be updated.

ResourceGroupName string

Name of the resource group where the vault that should be updated is located.

Name string

The name of the network mapping.

recoveryFabricName string

Name of fabric that should contain this protection container.

recoveryVaultName string

The name of the vault that should be updated.

resourceGroupName string

Name of the resource group where the vault that should be updated is located.

name string

The name of the network mapping.

recovery_fabric_name str

Name of fabric that should contain this protection container.

recovery_vault_name str

The name of the vault that should be updated.

resource_group_name str

Name of the resource group where the vault that should be updated is located.

name str

The name of the network mapping.

Outputs

All input properties are implicitly available as output properties. Additionally, the ProtectionContainer 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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing ProtectionContainer Resource

Get an existing ProtectionContainer resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

static get(resource_name, id, opts=None, name=None, recovery_fabric_name=None, recovery_vault_name=None, resource_group_name=None, __props__=None);
func GetProtectionContainer(ctx *Context, name string, id IDInput, state *ProtectionContainerState, opts ...ResourceOption) (*ProtectionContainer, error)
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.

The following state arguments are supported:

Name string

The name of the network mapping.

RecoveryFabricName string

Name of fabric that should contain this protection container.

RecoveryVaultName string

The name of the vault that should be updated.

ResourceGroupName string

Name of the resource group where the vault that should be updated is located.

Name string

The name of the network mapping.

RecoveryFabricName string

Name of fabric that should contain this protection container.

RecoveryVaultName string

The name of the vault that should be updated.

ResourceGroupName string

Name of the resource group where the vault that should be updated is located.

name string

The name of the network mapping.

recoveryFabricName string

Name of fabric that should contain this protection container.

recoveryVaultName string

The name of the vault that should be updated.

resourceGroupName string

Name of the resource group where the vault that should be updated is located.

name str

The name of the network mapping.

recovery_fabric_name str

Name of fabric that should contain this protection container.

recovery_vault_name str

The name of the vault that should be updated.

resource_group_name str

Name of the resource group where the vault that should be updated is located.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.