import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * 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 * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * * const example = new azure.core.ResourceGroup("example", { * name: "example-rg", * location: "West US", * }); * const exampleVault = new azure.recoveryservices.Vault("example", { * name: "example-recovery-vault", * location: example.location, * resourceGroupName: example.name, * sku: "Standard", * }); * const exampleVMWareReplicationPolicy = new azure.siterecovery.VMWareReplicationPolicy("example", { * recoveryVaultId: exampleVault.id, * name: "example-policy", * recoveryPointRetentionInMinutes: 1440, * applicationConsistentSnapshotFrequencyInMinutes: 240, * }); * const test = new azure.siterecovery.VmwareReplicationPolicyAssociation("test", { * name: "example-association", * recoveryVaultId: exampleVault.id, * policyId: exampleVMWareReplicationPolicy.id, * }); * const exampleAccount = new azure.storage.Account("example", { * name: "examplestorageacc", * resourceGroupName: example.name, * location: example.location, * accountTier: "Standard", * accountKind: "StorageV2", * accountReplicationType: "LRS", * }); * const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", { * name: "example-net", * resourceGroupName: example.name, * addressSpaces: ["192.168.2.0/24"], * location: example.location, * }); * const exampleSubnet = new azure.network.Subnet("example", { * name: "example-subnet", * resourceGroupName: example.name, * virtualNetworkName: exampleVirtualNetwork.name, * addressPrefixes: ["192.168.2.0/24"], * }); * const exampleVmwareReplicatedVm = new azure.siterecovery.VmwareReplicatedVm("example", { * 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: [{ * sourceMacAddress: "00:00:00:00:00:00", * targetSubnetName: exampleSubnet.name, * isPrimary: true, * }], * }); * ``` * * ## API Providers * * * This resource uses the following Azure API Providers: * * * `Microsoft.OffAzure` - 2020-01-01 * * * `Microsoft.RecoveryServices` - 2024-04-01 * * ## Import * * Site Recovery VMWare Replicated VM's can be imported using the `resource id`, e.g. * * ```sh * $ 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 * ``` */ export declare class VmwareReplicatedVm extends pulumi.CustomResource { /** * Get an existing VmwareReplicatedVm resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: VmwareReplicatedVmState, opts?: pulumi.CustomResourceOptions): VmwareReplicatedVm; /** * Returns true if the given object is an instance of VmwareReplicatedVm. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is VmwareReplicatedVm; /** * The name of VMWare appliance which handles the replication. Changing this forces a new resource to be created. */ readonly applianceName: pulumi.Output; /** * 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 `defaultLogStorageAccountId` or `managedDisk` must be specified. * * > **Note:** Changing `defaultLogStorageAccountId` forces a new resource to be created. But removing it does not. * * > **Note:** When `defaultLogStorageAccountId` co-exist with `managedDisk`, the value of `defaultLogStorageAccountId` must be as same as `logStorageAccountId` of every `managedDisk` or it forces a new resource to be created. */ readonly defaultLogStorageAccountId: pulumi.Output; /** * The type of storage account that should be used for recovery disks when a failover is done. Possible values are `Premium_LRS`, `PremiumV2_LRS`, `Premium_ZRS`, `Standard_LRS`, `StandardSSD_LRS`, `StandardSSD_ZRS` and `UltraSSD_LRS`. * * > **Note:** Only one of `defaultRecoveryDiskType` or `managedDisk` must be specified. * * > **Note:** Changing `defaultRecoveryDiskType` forces a new resource to be created. But removing it does not. * * > **Note:** When `defaultRecoveryDiskType` co-exist with `managedDisk`, the value of `defaultRecoveryDiskType` must be as same as `targetDiskType` of every `managedDisk` or it forces a new resource to be created. */ readonly defaultRecoveryDiskType: pulumi.Output; /** * The ID of the default Disk Encryption Set that should be used for the disks when a failover is done. * * > **Note:** Changing `defaultTargetDiskEncryptionSetId` forces a new resource to be created. But removing it does not. * * > **Note:** When `defaultTargetDiskEncryptionSetId` co-exist with `managedDisk`, the value of `defaultTargetDiskEncryptionSetId` must be as same as `targetDiskEncryptionSetId` of every `managedDisk` or it forces a new resource to be created. */ readonly defaultTargetDiskEncryptionSetId: pulumi.Output; /** * The license type of the VM. Possible values are `NoLicenseType`, `NotSpecified` and `WindowsServer`. Defaults to `NotSpecified`. */ readonly licenseType: pulumi.Output; /** * One or more `managedDisk` block as defined below. It's available only if mobility service is already installed on the source VM. * * > **Note:** A replicated VM could be created without `managedDisk` block, once the block has been specified, changing it expect removing it forces a new resource to be created. */ readonly managedDisks: pulumi.Output; /** * Name of group in which all machines will replicate together and have shared crash consistent and app-consistent recovery points when failed over. */ readonly multiVmGroupName: pulumi.Output; /** * The name of the replicated VM. Changing this forces a new resource to be created. */ readonly name: pulumi.Output; /** * One or more `networkInterface` block as defined below. */ readonly networkInterfaces: pulumi.Output; /** * 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](https://learn.microsoft.com/en-us/azure/site-recovery/deploy-vmware-azure-replication-appliance-modernized). */ readonly physicalServerCredentialName: pulumi.Output; /** * The ID of the policy to use for this replicated VM. */ readonly recoveryReplicationPolicyId: pulumi.Output; /** * The ID of the Recovery Services Vault where the replicated VM is created. */ readonly recoveryVaultId: pulumi.Output; /** * The name of the source VM in VMWare. Changing this forces a new resource to be created. */ readonly sourceVmName: pulumi.Output; /** * The ID of availability set that the new VM should belong to when a failover is done. */ readonly targetAvailabilitySetId: pulumi.Output; /** * The ID of the storage account that should be used for boot diagnostics when a failover is done. */ readonly targetBootDiagnosticsStorageAccountId: pulumi.Output; /** * The ID of network to use when a failover is done. * * > **Note:** `targetNetworkId` is required when `networkInterface` is specified. */ readonly targetNetworkId: pulumi.Output; /** * The ID of Proximity Placement Group the new VM should belong to when a failover is done. * * > **Note:** Only one of `targetAvailabilitySetId` or `targetZone` can be specified. */ readonly targetProximityPlacementGroupId: pulumi.Output; /** * The ID of resource group where the VM should be created when a failover is done. */ readonly targetResourceGroupId: pulumi.Output; /** * Name of the VM that should be created when a failover is done. Changing this forces a new resource to be created. */ readonly targetVmName: pulumi.Output; /** * Size of the VM that should be created when a failover is done, such as `Standard_F2`. If it's not specified, it will automatically be set by detecting the source VM size. */ readonly targetVmSize: pulumi.Output; /** * Specifies the Availability Zone where the Failover VM should exist. */ readonly targetZone: pulumi.Output; /** * The ID of network to use when a test failover is done. */ readonly testNetworkId: pulumi.Output; /** * Create a VmwareReplicatedVm resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: VmwareReplicatedVmArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering VmwareReplicatedVm resources. */ export interface VmwareReplicatedVmState { /** * The name of VMWare appliance which handles the replication. Changing this forces a new resource to be created. */ applianceName?: pulumi.Input; /** * 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 `defaultLogStorageAccountId` or `managedDisk` must be specified. * * > **Note:** Changing `defaultLogStorageAccountId` forces a new resource to be created. But removing it does not. * * > **Note:** When `defaultLogStorageAccountId` co-exist with `managedDisk`, the value of `defaultLogStorageAccountId` must be as same as `logStorageAccountId` of every `managedDisk` or it forces a new resource to be created. */ defaultLogStorageAccountId?: pulumi.Input; /** * The type of storage account that should be used for recovery disks when a failover is done. Possible values are `Premium_LRS`, `PremiumV2_LRS`, `Premium_ZRS`, `Standard_LRS`, `StandardSSD_LRS`, `StandardSSD_ZRS` and `UltraSSD_LRS`. * * > **Note:** Only one of `defaultRecoveryDiskType` or `managedDisk` must be specified. * * > **Note:** Changing `defaultRecoveryDiskType` forces a new resource to be created. But removing it does not. * * > **Note:** When `defaultRecoveryDiskType` co-exist with `managedDisk`, the value of `defaultRecoveryDiskType` must be as same as `targetDiskType` of every `managedDisk` or it forces a new resource to be created. */ defaultRecoveryDiskType?: pulumi.Input; /** * The ID of the default Disk Encryption Set that should be used for the disks when a failover is done. * * > **Note:** Changing `defaultTargetDiskEncryptionSetId` forces a new resource to be created. But removing it does not. * * > **Note:** When `defaultTargetDiskEncryptionSetId` co-exist with `managedDisk`, the value of `defaultTargetDiskEncryptionSetId` must be as same as `targetDiskEncryptionSetId` of every `managedDisk` or it forces a new resource to be created. */ defaultTargetDiskEncryptionSetId?: pulumi.Input; /** * The license type of the VM. Possible values are `NoLicenseType`, `NotSpecified` and `WindowsServer`. Defaults to `NotSpecified`. */ licenseType?: pulumi.Input; /** * One or more `managedDisk` block as defined below. It's available only if mobility service is already installed on the source VM. * * > **Note:** A replicated VM could be created without `managedDisk` block, once the block has been specified, changing it expect removing it forces a new resource to be created. */ managedDisks?: pulumi.Input[]>; /** * Name of group in which all machines will replicate together and have shared crash consistent and app-consistent recovery points when failed over. */ multiVmGroupName?: pulumi.Input; /** * The name of the replicated VM. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * One or more `networkInterface` block as defined below. */ networkInterfaces?: pulumi.Input[]>; /** * 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](https://learn.microsoft.com/en-us/azure/site-recovery/deploy-vmware-azure-replication-appliance-modernized). */ physicalServerCredentialName?: pulumi.Input; /** * The ID of the policy to use for this replicated VM. */ recoveryReplicationPolicyId?: pulumi.Input; /** * The ID of the Recovery Services Vault where the replicated VM is created. */ recoveryVaultId?: pulumi.Input; /** * The name of the source VM in VMWare. Changing this forces a new resource to be created. */ sourceVmName?: pulumi.Input; /** * The ID of availability set that the new VM should belong to when a failover is done. */ targetAvailabilitySetId?: pulumi.Input; /** * The ID of the storage account that should be used for boot diagnostics when a failover is done. */ targetBootDiagnosticsStorageAccountId?: pulumi.Input; /** * The ID of network to use when a failover is done. * * > **Note:** `targetNetworkId` is required when `networkInterface` is specified. */ targetNetworkId?: pulumi.Input; /** * The ID of Proximity Placement Group the new VM should belong to when a failover is done. * * > **Note:** Only one of `targetAvailabilitySetId` or `targetZone` can be specified. */ targetProximityPlacementGroupId?: pulumi.Input; /** * The ID of resource group where the VM should be created when a failover is done. */ targetResourceGroupId?: pulumi.Input; /** * Name of the VM that should be created when a failover is done. Changing this forces a new resource to be created. */ targetVmName?: pulumi.Input; /** * Size of the VM that should be created when a failover is done, such as `Standard_F2`. If it's not specified, it will automatically be set by detecting the source VM size. */ targetVmSize?: pulumi.Input; /** * Specifies the Availability Zone where the Failover VM should exist. */ targetZone?: pulumi.Input; /** * The ID of network to use when a test failover is done. */ testNetworkId?: pulumi.Input; } /** * The set of arguments for constructing a VmwareReplicatedVm resource. */ export interface VmwareReplicatedVmArgs { /** * The name of VMWare appliance which handles the replication. Changing this forces a new resource to be created. */ applianceName: pulumi.Input; /** * 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 `defaultLogStorageAccountId` or `managedDisk` must be specified. * * > **Note:** Changing `defaultLogStorageAccountId` forces a new resource to be created. But removing it does not. * * > **Note:** When `defaultLogStorageAccountId` co-exist with `managedDisk`, the value of `defaultLogStorageAccountId` must be as same as `logStorageAccountId` of every `managedDisk` or it forces a new resource to be created. */ defaultLogStorageAccountId?: pulumi.Input; /** * The type of storage account that should be used for recovery disks when a failover is done. Possible values are `Premium_LRS`, `PremiumV2_LRS`, `Premium_ZRS`, `Standard_LRS`, `StandardSSD_LRS`, `StandardSSD_ZRS` and `UltraSSD_LRS`. * * > **Note:** Only one of `defaultRecoveryDiskType` or `managedDisk` must be specified. * * > **Note:** Changing `defaultRecoveryDiskType` forces a new resource to be created. But removing it does not. * * > **Note:** When `defaultRecoveryDiskType` co-exist with `managedDisk`, the value of `defaultRecoveryDiskType` must be as same as `targetDiskType` of every `managedDisk` or it forces a new resource to be created. */ defaultRecoveryDiskType?: pulumi.Input; /** * The ID of the default Disk Encryption Set that should be used for the disks when a failover is done. * * > **Note:** Changing `defaultTargetDiskEncryptionSetId` forces a new resource to be created. But removing it does not. * * > **Note:** When `defaultTargetDiskEncryptionSetId` co-exist with `managedDisk`, the value of `defaultTargetDiskEncryptionSetId` must be as same as `targetDiskEncryptionSetId` of every `managedDisk` or it forces a new resource to be created. */ defaultTargetDiskEncryptionSetId?: pulumi.Input; /** * The license type of the VM. Possible values are `NoLicenseType`, `NotSpecified` and `WindowsServer`. Defaults to `NotSpecified`. */ licenseType?: pulumi.Input; /** * One or more `managedDisk` block as defined below. It's available only if mobility service is already installed on the source VM. * * > **Note:** A replicated VM could be created without `managedDisk` block, once the block has been specified, changing it expect removing it forces a new resource to be created. */ managedDisks?: pulumi.Input[]>; /** * Name of group in which all machines will replicate together and have shared crash consistent and app-consistent recovery points when failed over. */ multiVmGroupName?: pulumi.Input; /** * The name of the replicated VM. Changing this forces a new resource to be created. */ name?: pulumi.Input; /** * One or more `networkInterface` block as defined below. */ networkInterfaces?: pulumi.Input[]>; /** * 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](https://learn.microsoft.com/en-us/azure/site-recovery/deploy-vmware-azure-replication-appliance-modernized). */ physicalServerCredentialName: pulumi.Input; /** * The ID of the policy to use for this replicated VM. */ recoveryReplicationPolicyId: pulumi.Input; /** * The ID of the Recovery Services Vault where the replicated VM is created. */ recoveryVaultId: pulumi.Input; /** * The name of the source VM in VMWare. Changing this forces a new resource to be created. */ sourceVmName: pulumi.Input; /** * The ID of availability set that the new VM should belong to when a failover is done. */ targetAvailabilitySetId?: pulumi.Input; /** * The ID of the storage account that should be used for boot diagnostics when a failover is done. */ targetBootDiagnosticsStorageAccountId?: pulumi.Input; /** * The ID of network to use when a failover is done. * * > **Note:** `targetNetworkId` is required when `networkInterface` is specified. */ targetNetworkId?: pulumi.Input; /** * The ID of Proximity Placement Group the new VM should belong to when a failover is done. * * > **Note:** Only one of `targetAvailabilitySetId` or `targetZone` can be specified. */ targetProximityPlacementGroupId?: pulumi.Input; /** * The ID of resource group where the VM should be created when a failover is done. */ targetResourceGroupId: pulumi.Input; /** * Name of the VM that should be created when a failover is done. Changing this forces a new resource to be created. */ targetVmName: pulumi.Input; /** * Size of the VM that should be created when a failover is done, such as `Standard_F2`. If it's not specified, it will automatically be set by detecting the source VM size. */ targetVmSize?: pulumi.Input; /** * Specifies the Availability Zone where the Failover VM should exist. */ targetZone?: pulumi.Input; /** * The ID of network to use when a test failover is done. */ testNetworkId?: pulumi.Input; }