We recommend using Azure Native.
azure.siterecovery.VmwareReplicationPolicyAssociation
Explore with Pulumi AI
Manages an Azure Site Recovery replication policy for VMWare within a Recovery Vault.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-rg",
location: "East 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", {
name: "example-policy",
recoveryVaultId: exampleVault.id,
recoveryPointRetentionInMinutes: 1440,
applicationConsistentSnapshotFrequencyInMinutes: 240,
});
const exampleVmwareReplicationPolicyAssociation = new azure.siterecovery.VmwareReplicationPolicyAssociation("example", {
name: "example-association",
recoveryVaultId: exampleVault.id,
policyId: exampleVMWareReplicationPolicy.id,
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-rg",
location="East US")
example_vault = azure.recoveryservices.Vault("example",
name="example-recovery-vault",
location=example.location,
resource_group_name=example.name,
sku="Standard")
example_vm_ware_replication_policy = azure.siterecovery.VMWareReplicationPolicy("example",
name="example-policy",
recovery_vault_id=example_vault.id,
recovery_point_retention_in_minutes=1440,
application_consistent_snapshot_frequency_in_minutes=240)
example_vmware_replication_policy_association = azure.siterecovery.VmwareReplicationPolicyAssociation("example",
name="example-association",
recovery_vault_id=example_vault.id,
policy_id=example_vm_ware_replication_policy.id)
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 {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-rg"),
Location: pulumi.String("East US"),
})
if err != nil {
return err
}
exampleVault, err := recoveryservices.NewVault(ctx, "example", &recoveryservices.VaultArgs{
Name: pulumi.String("example-recovery-vault"),
Location: example.Location,
ResourceGroupName: example.Name,
Sku: pulumi.String("Standard"),
})
if err != nil {
return err
}
exampleVMWareReplicationPolicy, err := siterecovery.NewVMWareReplicationPolicy(ctx, "example", &siterecovery.VMWareReplicationPolicyArgs{
Name: pulumi.String("example-policy"),
RecoveryVaultId: exampleVault.ID(),
RecoveryPointRetentionInMinutes: pulumi.Int(1440),
ApplicationConsistentSnapshotFrequencyInMinutes: pulumi.Int(240),
})
if err != nil {
return err
}
_, err = siterecovery.NewVmwareReplicationPolicyAssociation(ctx, "example", &siterecovery.VmwareReplicationPolicyAssociationArgs{
Name: pulumi.String("example-association"),
RecoveryVaultId: exampleVault.ID(),
PolicyId: exampleVMWareReplicationPolicy.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-rg",
Location = "East US",
});
var exampleVault = new Azure.RecoveryServices.Vault("example", new()
{
Name = "example-recovery-vault",
Location = example.Location,
ResourceGroupName = example.Name,
Sku = "Standard",
});
var exampleVMWareReplicationPolicy = new Azure.SiteRecovery.VMWareReplicationPolicy("example", new()
{
Name = "example-policy",
RecoveryVaultId = exampleVault.Id,
RecoveryPointRetentionInMinutes = 1440,
ApplicationConsistentSnapshotFrequencyInMinutes = 240,
});
var exampleVmwareReplicationPolicyAssociation = new Azure.SiteRecovery.VmwareReplicationPolicyAssociation("example", new()
{
Name = "example-association",
RecoveryVaultId = exampleVault.Id,
PolicyId = exampleVMWareReplicationPolicy.Id,
});
});
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 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("East 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()
.name("example-policy")
.recoveryVaultId(exampleVault.id())
.recoveryPointRetentionInMinutes(1440)
.applicationConsistentSnapshotFrequencyInMinutes(240)
.build());
var exampleVmwareReplicationPolicyAssociation = new VmwareReplicationPolicyAssociation("exampleVmwareReplicationPolicyAssociation", VmwareReplicationPolicyAssociationArgs.builder()
.name("example-association")
.recoveryVaultId(exampleVault.id())
.policyId(exampleVMWareReplicationPolicy.id())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-rg
location: East US
exampleVault:
type: azure:recoveryservices:Vault
name: example
properties:
name: example-recovery-vault
location: ${example.location}
resourceGroupName: ${example.name}
sku: Standard
exampleVMWareReplicationPolicy:
type: azure:siterecovery:VMWareReplicationPolicy
name: example
properties:
name: example-policy
recoveryVaultId: ${exampleVault.id}
recoveryPointRetentionInMinutes: 1440
applicationConsistentSnapshotFrequencyInMinutes: 240
exampleVmwareReplicationPolicyAssociation:
type: azure:siterecovery:VmwareReplicationPolicyAssociation
name: example
properties:
name: example-association
recoveryVaultId: ${exampleVault.id}
policyId: ${exampleVMWareReplicationPolicy.id}
Create VmwareReplicationPolicyAssociation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VmwareReplicationPolicyAssociation(name: string, args: VmwareReplicationPolicyAssociationArgs, opts?: CustomResourceOptions);
@overload
def VmwareReplicationPolicyAssociation(resource_name: str,
args: VmwareReplicationPolicyAssociationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VmwareReplicationPolicyAssociation(resource_name: str,
opts: Optional[ResourceOptions] = None,
policy_id: Optional[str] = None,
recovery_vault_id: Optional[str] = None,
name: Optional[str] = None)
func NewVmwareReplicationPolicyAssociation(ctx *Context, name string, args VmwareReplicationPolicyAssociationArgs, opts ...ResourceOption) (*VmwareReplicationPolicyAssociation, error)
public VmwareReplicationPolicyAssociation(string name, VmwareReplicationPolicyAssociationArgs args, CustomResourceOptions? opts = null)
public VmwareReplicationPolicyAssociation(String name, VmwareReplicationPolicyAssociationArgs args)
public VmwareReplicationPolicyAssociation(String name, VmwareReplicationPolicyAssociationArgs args, CustomResourceOptions options)
type: azure:siterecovery:VmwareReplicationPolicyAssociation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args VmwareReplicationPolicyAssociationArgs
- 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 VmwareReplicationPolicyAssociationArgs
- 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 VmwareReplicationPolicyAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VmwareReplicationPolicyAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VmwareReplicationPolicyAssociationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var vmwareReplicationPolicyAssociationResource = new Azure.SiteRecovery.VmwareReplicationPolicyAssociation("vmwareReplicationPolicyAssociationResource", new()
{
PolicyId = "string",
RecoveryVaultId = "string",
Name = "string",
});
example, err := siterecovery.NewVmwareReplicationPolicyAssociation(ctx, "vmwareReplicationPolicyAssociationResource", &siterecovery.VmwareReplicationPolicyAssociationArgs{
PolicyId: pulumi.String("string"),
RecoveryVaultId: pulumi.String("string"),
Name: pulumi.String("string"),
})
var vmwareReplicationPolicyAssociationResource = new VmwareReplicationPolicyAssociation("vmwareReplicationPolicyAssociationResource", VmwareReplicationPolicyAssociationArgs.builder()
.policyId("string")
.recoveryVaultId("string")
.name("string")
.build());
vmware_replication_policy_association_resource = azure.siterecovery.VmwareReplicationPolicyAssociation("vmwareReplicationPolicyAssociationResource",
policy_id="string",
recovery_vault_id="string",
name="string")
const vmwareReplicationPolicyAssociationResource = new azure.siterecovery.VmwareReplicationPolicyAssociation("vmwareReplicationPolicyAssociationResource", {
policyId: "string",
recoveryVaultId: "string",
name: "string",
});
type: azure:siterecovery:VmwareReplicationPolicyAssociation
properties:
name: string
policyId: string
recoveryVaultId: string
VmwareReplicationPolicyAssociation 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 VmwareReplicationPolicyAssociation resource accepts the following input properties:
- Policy
Id string - The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created.
- Recovery
Vault stringId - The ID of the Recovery Service Vault to which the policy should be associated. Changing this forces a new association to be created.
- Name string
- The name of the replication policy association. Changing this forces a new association to be created.
- Policy
Id string - The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created.
- Recovery
Vault stringId - The ID of the Recovery Service Vault to which the policy should be associated. Changing this forces a new association to be created.
- Name string
- The name of the replication policy association. Changing this forces a new association to be created.
- policy
Id String - The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created.
- recovery
Vault StringId - The ID of the Recovery Service Vault to which the policy should be associated. Changing this forces a new association to be created.
- name String
- The name of the replication policy association. Changing this forces a new association to be created.
- policy
Id string - The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created.
- recovery
Vault stringId - The ID of the Recovery Service Vault to which the policy should be associated. Changing this forces a new association to be created.
- name string
- The name of the replication policy association. Changing this forces a new association to be created.
- policy_
id str - The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created.
- recovery_
vault_ strid - The ID of the Recovery Service Vault to which the policy should be associated. Changing this forces a new association to be created.
- name str
- The name of the replication policy association. Changing this forces a new association to be created.
- policy
Id String - The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created.
- recovery
Vault StringId - The ID of the Recovery Service Vault to which the policy should be associated. Changing this forces a new association to be created.
- name String
- The name of the replication policy association. Changing this forces a new association to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the VmwareReplicationPolicyAssociation 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 Existing VmwareReplicationPolicyAssociation Resource
Get an existing VmwareReplicationPolicyAssociation 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?: VmwareReplicationPolicyAssociationState, opts?: CustomResourceOptions): VmwareReplicationPolicyAssociation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
policy_id: Optional[str] = None,
recovery_vault_id: Optional[str] = None) -> VmwareReplicationPolicyAssociation
func GetVmwareReplicationPolicyAssociation(ctx *Context, name string, id IDInput, state *VmwareReplicationPolicyAssociationState, opts ...ResourceOption) (*VmwareReplicationPolicyAssociation, error)
public static VmwareReplicationPolicyAssociation Get(string name, Input<string> id, VmwareReplicationPolicyAssociationState? state, CustomResourceOptions? opts = null)
public static VmwareReplicationPolicyAssociation get(String name, Output<String> id, VmwareReplicationPolicyAssociationState 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.
- Name string
- The name of the replication policy association. Changing this forces a new association to be created.
- Policy
Id string - The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created.
- Recovery
Vault stringId - The ID of the Recovery Service Vault to which the policy should be associated. Changing this forces a new association to be created.
- Name string
- The name of the replication policy association. Changing this forces a new association to be created.
- Policy
Id string - The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created.
- Recovery
Vault stringId - The ID of the Recovery Service Vault to which the policy should be associated. Changing this forces a new association to be created.
- name String
- The name of the replication policy association. Changing this forces a new association to be created.
- policy
Id String - The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created.
- recovery
Vault StringId - The ID of the Recovery Service Vault to which the policy should be associated. Changing this forces a new association to be created.
- name string
- The name of the replication policy association. Changing this forces a new association to be created.
- policy
Id string - The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created.
- recovery
Vault stringId - The ID of the Recovery Service Vault to which the policy should be associated. Changing this forces a new association to be created.
- name str
- The name of the replication policy association. Changing this forces a new association to be created.
- policy_
id str - The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created.
- recovery_
vault_ strid - The ID of the Recovery Service Vault to which the policy should be associated. Changing this forces a new association to be created.
- name String
- The name of the replication policy association. Changing this forces a new association to be created.
- policy
Id String - The ID of the VMWare replication policy which to be associated. Changing this forces a new association to be created.
- recovery
Vault StringId - The ID of the Recovery Service Vault to which the policy should be associated. Changing this forces a new association to be created.
Import
Site Recovery Replication Policies can be imported using the resource id
, e.g.
$ pulumi import azure:siterecovery/vmwareReplicationPolicyAssociation:VmwareReplicationPolicyAssociation mypolicy /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/replicationFabrics/site-name/replicationProtectionContainers/container-name/replicationProtectionContainerMappings/mapping-name
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.