Azure Classic

v5.19.0 published on Friday, Sep 16, 2022 by Pulumi

Fabric

Manages a Azure Site Recovery Replication Fabric within a Recovery Services vault. Only Azure fabrics are supported at this time. Replication Fabrics serve as a container within an Azure region for other Site Recovery resources such as protection containers, protected items, network mappings.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var primary = new Azure.Core.ResourceGroup("primary", new()
    {
        Location = "West US",
    });

    var secondary = new Azure.Core.ResourceGroup("secondary", new()
    {
        Location = "East US",
    });

    var vault = new Azure.RecoveryServices.Vault("vault", new()
    {
        Location = secondary.Location,
        ResourceGroupName = secondary.Name,
        Sku = "Standard",
    });

    var fabric = new Azure.SiteRecovery.Fabric("fabric", new()
    {
        ResourceGroupName = secondary.Name,
        RecoveryVaultName = vault.Name,
        Location = primary.Location,
    });

});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/recoveryservices"
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/siterecovery"
	"github.com/pulumi/pulumi/sdk/v3/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
		}
		_, err = siterecovery.NewFabric(ctx, "fabric", &siterecovery.FabricArgs{
			ResourceGroupName: secondary.Name,
			RecoveryVaultName: vault.Name,
			Location:          primary.Location,
		})
		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.recoveryservices.Vault;
import com.pulumi.azure.recoveryservices.VaultArgs;
import com.pulumi.azure.siterecovery.Fabric;
import com.pulumi.azure.siterecovery.FabricArgs;
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 primary = new ResourceGroup("primary", ResourceGroupArgs.builder()        
            .location("West US")
            .build());

        var secondary = new ResourceGroup("secondary", ResourceGroupArgs.builder()        
            .location("East US")
            .build());

        var vault = new Vault("vault", VaultArgs.builder()        
            .location(secondary.location())
            .resourceGroupName(secondary.name())
            .sku("Standard")
            .build());

        var fabric = new Fabric("fabric", FabricArgs.builder()        
            .resourceGroupName(secondary.name())
            .recoveryVaultName(vault.name())
            .location(primary.location())
            .build());

    }
}
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)
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,
});
resources:
  primary:
    type: azure:core:ResourceGroup
    properties:
      location: West US
  secondary:
    type: azure:core:ResourceGroup
    properties:
      location: East US
  vault:
    type: azure:recoveryservices:Vault
    properties:
      location: ${secondary.location}
      resourceGroupName: ${secondary.name}
      sku: Standard
  fabric:
    type: azure:siterecovery:Fabric
    properties:
      resourceGroupName: ${secondary.name}
      recoveryVaultName: ${vault.name}
      location: ${primary.location}

Create a Fabric Resource

new Fabric(name: string, args: FabricArgs, opts?: CustomResourceOptions);
@overload
def Fabric(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           location: Optional[str] = None,
           name: Optional[str] = None,
           recovery_vault_name: Optional[str] = None,
           resource_group_name: Optional[str] = None)
@overload
def Fabric(resource_name: str,
           args: FabricArgs,
           opts: Optional[ResourceOptions] = None)
func NewFabric(ctx *Context, name string, args FabricArgs, opts ...ResourceOption) (*Fabric, error)
public Fabric(string name, FabricArgs args, CustomResourceOptions? opts = null)
public Fabric(String name, FabricArgs args)
public Fabric(String name, FabricArgs args, CustomResourceOptions options)
type: azure:siterecovery:Fabric
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args FabricArgs
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 FabricArgs
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 FabricArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args FabricArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args FabricArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Fabric 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 Fabric resource accepts the following input properties:

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.

Location string

In what region should the fabric be located.

Name string

The name of the network mapping.

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.

Location string

In what region should the fabric be located.

Name string

The name of the network mapping.

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.

location String

In what region should the fabric be located.

name String

The name of the network mapping.

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.

location string

In what region should the fabric be located.

name string

The name of the network mapping.

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.

location str

In what region should the fabric be located.

name str

The name of the network mapping.

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.

location String

In what region should the fabric be located.

name String

The name of the network mapping.

Outputs

All input properties are implicitly available as output properties. Additionally, the Fabric 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 an Existing Fabric Resource

Get an existing Fabric 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?: FabricState, opts?: CustomResourceOptions): Fabric
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        recovery_vault_name: Optional[str] = None,
        resource_group_name: Optional[str] = None) -> Fabric
func GetFabric(ctx *Context, name string, id IDInput, state *FabricState, opts ...ResourceOption) (*Fabric, error)
public static Fabric Get(string name, Input<string> id, FabricState? state, CustomResourceOptions? opts = null)
public static Fabric get(String name, Output<String> id, FabricState 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.
The following state arguments are supported:
Location string

In what region should the fabric be located.

Name string

The name of the network mapping.

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.

Location string

In what region should the fabric be located.

Name string

The name of the network mapping.

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.

location String

In what region should the fabric be located.

name String

The name of the network mapping.

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.

location string

In what region should the fabric be located.

name string

The name of the network mapping.

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.

location str

In what region should the fabric be located.

name str

The name of the network mapping.

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.

location String

In what region should the fabric be located.

name String

The name of the network mapping.

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.

Import

Site Recovery Fabric can be imported using the resource id, e.g.

 $ pulumi import azure:siterecovery/fabric:Fabric myfabric /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/fabric-name

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.