Vmware Replicated Vm Args
Manages a VMWare replicated VM using Azure Site Recovery (VMWare to Azure only). A replicated VM keeps a copiously updated image of the VM in Azure in order to be able to start the VM in Azure in case of a disaster.
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.VMWareReplicationPolicy;
import com.pulumi.azure.siterecovery.VMWareReplicationPolicyArgs;
import com.pulumi.azure.siterecovery.VmwareReplicationPolicyAssociation;
import com.pulumi.azure.siterecovery.VmwareReplicationPolicyAssociationArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.siterecovery.VmwareReplicatedVm;
import com.pulumi.azure.siterecovery.VmwareReplicatedVmArgs;
import com.pulumi.azure.siterecovery.inputs.VmwareReplicatedVmNetworkInterfaceArgs;
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()
.name("example-rg")
.location("West US")
.build());
var exampleVault = new Vault("exampleVault", VaultArgs.builder()
.name("example-recovery-vault")
.location(example.location())
.resourceGroupName(example.name())
.sku("Standard")
.build());
var exampleVMWareReplicationPolicy = new VMWareReplicationPolicy("exampleVMWareReplicationPolicy", VMWareReplicationPolicyArgs.builder()
.recoveryVaultId(exampleVault.id())
.name("example-policy")
.recoveryPointRetentionInMinutes(1440)
.applicationConsistentSnapshotFrequencyInMinutes(240)
.build());
var test = new VmwareReplicationPolicyAssociation("test", VmwareReplicationPolicyAssociationArgs.builder()
.name("example-association")
.recoveryVaultId(exampleVault.id())
.policyId(exampleVMWareReplicationPolicy.id())
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("examplestorageacc")
.resourceGroupName(example.name())
.location(example.location())
.accountTier("Standard")
.accountKind("StorageV2")
.accountReplicationType("LRS")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.name("example-net")
.resourceGroupName(example.name())
.addressSpaces("192.168.2.0/24")
.location(example.location())
.build());
var exampleSubnet = new Subnet("exampleSubnet", SubnetArgs.builder()
.name("example-subnet")
.resourceGroupName(example.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("192.168.2.0/24")
.build());
var exampleVmwareReplicatedVm = new VmwareReplicatedVm("exampleVmwareReplicatedVm", VmwareReplicatedVmArgs.builder()
.name("example-vmware-vm")
.recoveryVaultId(exampleVault.id())
.sourceVmName("example-vm")
.applianceName("example-appliance")
.recoveryReplicationPolicyId(exampleAzurermSiteRecoveryVmwareReplicationPolicyAssociation.policyId())
.physicalServerCredentialName("example-creds")
.licenseType("NotSpecified")
.targetBootDiagnosticsStorageAccountId(exampleAccount.id())
.targetVmName("example_replicated_vm")
.targetResourceGroupId(example.id())
.defaultLogStorageAccountId(exampleAccount.id())
.defaultRecoveryDiskType("Standard_LRS")
.targetNetworkId(exampleVirtualNetwork.id())
.networkInterfaces(VmwareReplicatedVmNetworkInterfaceArgs.builder()
.sourceMacAddress("00:00:00:00:00:00")
.targetSubnetName(exampleSubnet.name())
.isPrimary(true)
.build())
.build());
}
}
Import
Site Recovery VMWare Replicated VM's can be imported using the resource id
, e.g.
$ pulumi import azure:siterecovery/vmwareReplicatedVm:VmwareReplicatedVm vmreplication /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/fabric-name/replicationProtectionContainers/protection-container-name/replicationProtectedItems/vm-replication-name
Constructors
Functions
Properties
The ID of the stroage account that should be used for logging during replication. Note: Only standard types of storage accounts are allowed. Note: Only one of default_log_storage_account_id
or managed_disk
must be specified. Note: Changing default_log_storage_account_id
forces a new resource to be created. But removing it does not. Note: When default_log_storage_account_id
co-exist with managed_disk
, the value of default_log_storage_account_id
must be as same as log_storage_account_id
of every managed_disk
or it forces a new resource to be created.
The type of storage account that should be used for recovery disks when a failover is done. Possible values are Standard_LRS
, Standard_LRS
and StandardSSD_LRS
. Note: Only one of default_recovery_disk_type
or managed_disk
must be specified. Note: Changing default_recovery_disk_type
forces a new resource to be created. But removing it does not. Note: When default_recovery_disk_type
co-exist with managed_disk
, the value of default_recovery_disk_type
must be as same as target_disk_type
of every managed_disk
or it forces a new resource to be created.
The ID of the default Disk Encryption Set that should be used for the disks when a failover is done. Note: Changing default_target_disk_encryption_set_id
forces a new resource to be created. But removing it does not. Note: When default_target_disk_encryption_set_id
co-exist with managed_disk
, the value of default_target_disk_encryption_set_id
must be as same as target_disk_encryption_set_id
of every managed_disk
or it forces a new resource to be created.
The name of the credential to access the source VM. Changing this forces a new resource to be created. More information about the credentials could be found here.