HypervNetworkMappingArgs

data class HypervNetworkMappingArgs(val name: Output<String>? = null, val recoveryVaultId: Output<String>? = null, val sourceNetworkName: Output<String>? = null, val sourceSystemCenterVirtualMachineManagerName: Output<String>? = null, val targetNetworkId: Output<String>? = null) : ConvertibleToJava<HypervNetworkMappingArgs>

Manages a HyperV site recovery network mapping on Azure. A HyperV network mapping decides how to translate connected networks when a VM is migrated from HyperV VMM Center to Azure.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const target = new azure.core.ResourceGroup("target", {
name: "tfex-network-mapping",
location: "East US",
});
const vault = new azure.recoveryservices.Vault("vault", {
name: "example-recovery-vault",
location: target.location,
resourceGroupName: target.name,
sku: "Standard",
});
const targetVirtualNetwork = new azure.network.VirtualNetwork("target", {
name: "network",
resourceGroupName: target.name,
addressSpaces: ["192&#46;168&#46;2&#46;0/24"],
location: target.location,
});
const recovery_mapping = new azure.siterecovery.HypervNetworkMapping("recovery-mapping", {
name: "recovery-network-mapping",
recoveryVaultId: vault.id,
sourceSystemCenterVirtualMachineManagerName: "my-vmm-server",
sourceNetworkName: "my-vmm-network",
targetNetworkId: targetVirtualNetwork.id,
});
import pulumi
import pulumi_azure as azure
target = azure.core.ResourceGroup("target",
name="tfex-network-mapping",
location="East US")
vault = azure.recoveryservices.Vault("vault",
name="example-recovery-vault",
location=target.location,
resource_group_name=target.name,
sku="Standard")
target_virtual_network = azure.network.VirtualNetwork("target",
name="network",
resource_group_name=target.name,
address_spaces=["192&#46;168&#46;2&#46;0/24"],
location=target.location)
recovery_mapping = azure.siterecovery.HypervNetworkMapping("recovery-mapping",
name="recovery-network-mapping",
recovery_vault_id=vault.id,
source_system_center_virtual_machine_manager_name="my-vmm-server",
source_network_name="my-vmm-network",
target_network_id=target_virtual_network.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var target = new Azure.Core.ResourceGroup("target", new()
{
Name = "tfex-network-mapping",
Location = "East US",
});
var vault = new Azure.RecoveryServices.Vault("vault", new()
{
Name = "example-recovery-vault",
Location = target.Location,
ResourceGroupName = target.Name,
Sku = "Standard",
});
var targetVirtualNetwork = new Azure.Network.VirtualNetwork("target", new()
{
Name = "network",
ResourceGroupName = target.Name,
AddressSpaces = new[]
{
"192.168.2.0/24",
},
Location = target.Location,
});
var recovery_mapping = new Azure.SiteRecovery.HypervNetworkMapping("recovery-mapping", new()
{
Name = "recovery-network-mapping",
RecoveryVaultId = vault.Id,
SourceSystemCenterVirtualMachineManagerName = "my-vmm-server",
SourceNetworkName = "my-vmm-network",
TargetNetworkId = targetVirtualNetwork.Id,
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/network"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/recoveryservices"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
target, err := core.NewResourceGroup(ctx, "target", &core.ResourceGroupArgs{
Name: pulumi.String("tfex-network-mapping"),
Location: pulumi.String("East US"),
})
if err != nil {
return err
}
vault, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{
Name: pulumi.String("example-recovery-vault"),
Location: target.Location,
ResourceGroupName: target.Name,
Sku: pulumi.String("Standard"),
})
if err != nil {
return err
}
targetVirtualNetwork, err := network.NewVirtualNetwork(ctx, "target", &network.VirtualNetworkArgs{
Name: pulumi.String("network"),
ResourceGroupName: target.Name,
AddressSpaces: pulumi.StringArray{
pulumi.String("192.168.2.0/24"),
},
Location: target.Location,
})
if err != nil {
return err
}
_, err = siterecovery.NewHypervNetworkMapping(ctx, "recovery-mapping", &siterecovery.HypervNetworkMappingArgs{
Name: pulumi.String("recovery-network-mapping"),
RecoveryVaultId: vault.ID(),
SourceSystemCenterVirtualMachineManagerName: pulumi.String("my-vmm-server"),
SourceNetworkName: pulumi.String("my-vmm-network"),
TargetNetworkId: targetVirtualNetwork.ID(),
})
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.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.siterecovery.HypervNetworkMapping;
import com.pulumi.azure.siterecovery.HypervNetworkMappingArgs;
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 target = new ResourceGroup("target", ResourceGroupArgs.builder()
.name("tfex-network-mapping")
.location("East US")
.build());
var vault = new Vault("vault", VaultArgs.builder()
.name("example-recovery-vault")
.location(target.location())
.resourceGroupName(target.name())
.sku("Standard")
.build());
var targetVirtualNetwork = new VirtualNetwork("targetVirtualNetwork", VirtualNetworkArgs.builder()
.name("network")
.resourceGroupName(target.name())
.addressSpaces("192.168.2.0/24")
.location(target.location())
.build());
var recovery_mapping = new HypervNetworkMapping("recovery-mapping", HypervNetworkMappingArgs.builder()
.name("recovery-network-mapping")
.recoveryVaultId(vault.id())
.sourceSystemCenterVirtualMachineManagerName("my-vmm-server")
.sourceNetworkName("my-vmm-network")
.targetNetworkId(targetVirtualNetwork.id())
.build());
}
}
resources:
target:
type: azure:core:ResourceGroup
properties:
name: tfex-network-mapping
location: East US
vault:
type: azure:recoveryservices:Vault
properties:
name: example-recovery-vault
location: ${target.location}
resourceGroupName: ${target.name}
sku: Standard
targetVirtualNetwork:
type: azure:network:VirtualNetwork
name: target
properties:
name: network
resourceGroupName: ${target.name}
addressSpaces:
- 192.168.2.0/24
location: ${target.location}
recovery-mapping:
type: azure:siterecovery:HypervNetworkMapping
properties:
name: recovery-network-mapping
recoveryVaultId: ${vault.id}
sourceSystemCenterVirtualMachineManagerName: my-vmm-server
sourceNetworkName: my-vmm-network
targetNetworkId: ${targetVirtualNetwork.id}

API Providers

This resource uses the following Azure API Providers:

  • Microsoft.RecoveryServices: 2024-04-01

Import

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

$ pulumi import azure:siterecovery/hypervNetworkMapping:HypervNetworkMapping  azurerm_site_recovery_hyperv_network_mapping.mymapping /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/primary-fabric-name/replicationNetworks/azureNetwork/replicationNetworkMappings/mapping-name

Constructors

Link copied to clipboard
constructor(name: Output<String>? = null, recoveryVaultId: Output<String>? = null, sourceNetworkName: Output<String>? = null, sourceSystemCenterVirtualMachineManagerName: Output<String>? = null, targetNetworkId: Output<String>? = null)

Properties

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

The name of the HyperV network mapping. Changing this forces a new resource to be created.

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

The ID of the Recovery Services Vault where the HyperV network mapping should be created. Changing this forces a new resource to be created.

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

The Name of the primary network. Changing this forces a new resource to be created.

Specifies the name of source System Center Virtual Machine Manager where the source network exists. Changing this forces a new resource to be created.

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

The id of the recovery network. Changing this forces a new resource to be created.

Functions

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