NetworkMappingArgs

data class NetworkMappingArgs(val name: Output<String>? = null, val recoveryVaultName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val sourceNetworkId: Output<String>? = null, val sourceRecoveryFabricName: Output<String>? = null, val targetNetworkId: Output<String>? = null, val targetRecoveryFabricName: Output<String>? = null) : ConvertibleToJava<NetworkMappingArgs>

Manages a site recovery network mapping on Azure. A network mapping decides how to translate connected networks when a VM is migrated from one region to another.

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.siterecovery.Fabric;
import com.pulumi.azure.siterecovery.FabricArgs;
import com.pulumi.azure.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.siterecovery.NetworkMapping;
import com.pulumi.azure.siterecovery.NetworkMappingArgs;
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()
.name("tfex-network-mapping-primary")
.location("West US")
.build());
var secondary = new ResourceGroup("secondary", ResourceGroupArgs.builder()
.name("tfex-network-mapping-secondary")
.location("East US")
.build());
var vault = new Vault("vault", VaultArgs.builder()
.name("example-recovery-vault")
.location(secondary.location())
.resourceGroupName(secondary.name())
.sku("Standard")
.build());
var primaryFabric = new Fabric("primaryFabric", FabricArgs.builder()
.name("primary-fabric")
.resourceGroupName(secondary.name())
.recoveryVaultName(vault.name())
.location(primary.location())
.build());
var secondaryFabric = new Fabric("secondaryFabric", FabricArgs.builder()
.name("secondary-fabric")
.resourceGroupName(secondary.name())
.recoveryVaultName(vault.name())
.location(secondary.location())
.build());
var primaryVirtualNetwork = new VirtualNetwork("primaryVirtualNetwork", VirtualNetworkArgs.builder()
.name("network1")
.resourceGroupName(primary.name())
.addressSpaces("192.168.1.0/24")
.location(primary.location())
.build());
var secondaryVirtualNetwork = new VirtualNetwork("secondaryVirtualNetwork", VirtualNetworkArgs.builder()
.name("network2")
.resourceGroupName(secondary.name())
.addressSpaces("192.168.2.0/24")
.location(secondary.location())
.build());
var recovery_mapping = new NetworkMapping("recovery-mapping", NetworkMappingArgs.builder()
.name("recovery-network-mapping-1")
.resourceGroupName(secondary.name())
.recoveryVaultName(vault.name())
.sourceRecoveryFabricName("primary-fabric")
.targetRecoveryFabricName("secondary-fabric")
.sourceNetworkId(primaryVirtualNetwork.id())
.targetNetworkId(secondaryVirtualNetwork.id())
.build());
}
}

Import

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

$ pulumi import azure:siterecovery/networkMapping:NetworkMapping 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
fun NetworkMappingArgs(name: Output<String>? = null, recoveryVaultName: Output<String>? = null, resourceGroupName: Output<String>? = null, sourceNetworkId: Output<String>? = null, sourceRecoveryFabricName: Output<String>? = null, targetNetworkId: Output<String>? = null, targetRecoveryFabricName: Output<String>? = null)

Functions

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

Properties

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

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

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

The name of the vault that should be updated. 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 that should be updated is located. Changing this forces a new resource to be created.

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

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

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

Specifies the ASR fabric where mapping should be created. 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.

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

The Azure Site Recovery fabric object corresponding to the recovery Azure region. Changing this forces a new resource to be created.