We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
Manages a Storage Object Replication.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var srcResourceGroup = new Azure.Core.ResourceGroup("srcResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var srcAccount = new Azure.Storage.Account("srcAccount", new Azure.Storage.AccountArgs
{
ResourceGroupName = srcResourceGroup.Name,
Location = srcResourceGroup.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
BlobProperties = new Azure.Storage.Inputs.AccountBlobPropertiesArgs
{
VersioningEnabled = true,
ChangeFeedEnabled = true,
},
});
var srcContainer = new Azure.Storage.Container("srcContainer", new Azure.Storage.ContainerArgs
{
StorageAccountName = srcAccount.Name,
ContainerAccessType = "private",
});
var dstResourceGroup = new Azure.Core.ResourceGroup("dstResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "East US",
});
var dstAccount = new Azure.Storage.Account("dstAccount", new Azure.Storage.AccountArgs
{
ResourceGroupName = dstResourceGroup.Name,
Location = dstResourceGroup.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
BlobProperties = new Azure.Storage.Inputs.AccountBlobPropertiesArgs
{
VersioningEnabled = true,
ChangeFeedEnabled = true,
},
});
var dstContainer = new Azure.Storage.Container("dstContainer", new Azure.Storage.ContainerArgs
{
StorageAccountName = dstAccount.Name,
ContainerAccessType = "private",
});
var example = new Azure.Storage.ObjectReplication("example", new Azure.Storage.ObjectReplicationArgs
{
SourceStorageAccountId = srcAccount.Id,
DestinationStorageAccountId = dstAccount.Id,
Rules =
{
new Azure.Storage.Inputs.ObjectReplicationRuleArgs
{
SourceContainerName = srcContainer.Name,
DestinationContainerName = dstContainer.Name,
},
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
srcResourceGroup, err := core.NewResourceGroup(ctx, "srcResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
srcAccount, err := storage.NewAccount(ctx, "srcAccount", &storage.AccountArgs{
ResourceGroupName: srcResourceGroup.Name,
Location: srcResourceGroup.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("LRS"),
BlobProperties: &storage.AccountBlobPropertiesArgs{
VersioningEnabled: pulumi.Bool(true),
ChangeFeedEnabled: pulumi.Bool(true),
},
})
if err != nil {
return err
}
srcContainer, err := storage.NewContainer(ctx, "srcContainer", &storage.ContainerArgs{
StorageAccountName: srcAccount.Name,
ContainerAccessType: pulumi.String("private"),
})
if err != nil {
return err
}
dstResourceGroup, err := core.NewResourceGroup(ctx, "dstResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("East US"),
})
if err != nil {
return err
}
dstAccount, err := storage.NewAccount(ctx, "dstAccount", &storage.AccountArgs{
ResourceGroupName: dstResourceGroup.Name,
Location: dstResourceGroup.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("LRS"),
BlobProperties: &storage.AccountBlobPropertiesArgs{
VersioningEnabled: pulumi.Bool(true),
ChangeFeedEnabled: pulumi.Bool(true),
},
})
if err != nil {
return err
}
dstContainer, err := storage.NewContainer(ctx, "dstContainer", &storage.ContainerArgs{
StorageAccountName: dstAccount.Name,
ContainerAccessType: pulumi.String("private"),
})
if err != nil {
return err
}
_, err = storage.NewObjectReplication(ctx, "example", &storage.ObjectReplicationArgs{
SourceStorageAccountId: srcAccount.ID(),
DestinationStorageAccountId: dstAccount.ID(),
Rules: storage.ObjectReplicationRuleArray{
&storage.ObjectReplicationRuleArgs{
SourceContainerName: srcContainer.Name,
DestinationContainerName: dstContainer.Name,
},
},
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const srcResourceGroup = new azure.core.ResourceGroup("srcResourceGroup", {location: "West Europe"});
const srcAccount = new azure.storage.Account("srcAccount", {
resourceGroupName: srcResourceGroup.name,
location: srcResourceGroup.location,
accountTier: "Standard",
accountReplicationType: "LRS",
blobProperties: {
versioningEnabled: true,
changeFeedEnabled: true,
},
});
const srcContainer = new azure.storage.Container("srcContainer", {
storageAccountName: srcAccount.name,
containerAccessType: "private",
});
const dstResourceGroup = new azure.core.ResourceGroup("dstResourceGroup", {location: "East US"});
const dstAccount = new azure.storage.Account("dstAccount", {
resourceGroupName: dstResourceGroup.name,
location: dstResourceGroup.location,
accountTier: "Standard",
accountReplicationType: "LRS",
blobProperties: {
versioningEnabled: true,
changeFeedEnabled: true,
},
});
const dstContainer = new azure.storage.Container("dstContainer", {
storageAccountName: dstAccount.name,
containerAccessType: "private",
});
const example = new azure.storage.ObjectReplication("example", {
sourceStorageAccountId: srcAccount.id,
destinationStorageAccountId: dstAccount.id,
rules: [{
sourceContainerName: srcContainer.name,
destinationContainerName: dstContainer.name,
}],
});
import pulumi
import pulumi_azure as azure
src_resource_group = azure.core.ResourceGroup("srcResourceGroup", location="West Europe")
src_account = azure.storage.Account("srcAccount",
resource_group_name=src_resource_group.name,
location=src_resource_group.location,
account_tier="Standard",
account_replication_type="LRS",
blob_properties=azure.storage.AccountBlobPropertiesArgs(
versioning_enabled=True,
change_feed_enabled=True,
))
src_container = azure.storage.Container("srcContainer",
storage_account_name=src_account.name,
container_access_type="private")
dst_resource_group = azure.core.ResourceGroup("dstResourceGroup", location="East US")
dst_account = azure.storage.Account("dstAccount",
resource_group_name=dst_resource_group.name,
location=dst_resource_group.location,
account_tier="Standard",
account_replication_type="LRS",
blob_properties=azure.storage.AccountBlobPropertiesArgs(
versioning_enabled=True,
change_feed_enabled=True,
))
dst_container = azure.storage.Container("dstContainer",
storage_account_name=dst_account.name,
container_access_type="private")
example = azure.storage.ObjectReplication("example",
source_storage_account_id=src_account.id,
destination_storage_account_id=dst_account.id,
rules=[azure.storage.ObjectReplicationRuleArgs(
source_container_name=src_container.name,
destination_container_name=dst_container.name,
)])
Example coming soon!
Create ObjectReplication Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ObjectReplication(name: string, args: ObjectReplicationArgs, opts?: CustomResourceOptions);@overload
def ObjectReplication(resource_name: str,
args: ObjectReplicationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ObjectReplication(resource_name: str,
opts: Optional[ResourceOptions] = None,
destination_storage_account_id: Optional[str] = None,
rules: Optional[Sequence[ObjectReplicationRuleArgs]] = None,
source_storage_account_id: Optional[str] = None)func NewObjectReplication(ctx *Context, name string, args ObjectReplicationArgs, opts ...ResourceOption) (*ObjectReplication, error)public ObjectReplication(string name, ObjectReplicationArgs args, CustomResourceOptions? opts = null)
public ObjectReplication(String name, ObjectReplicationArgs args)
public ObjectReplication(String name, ObjectReplicationArgs args, CustomResourceOptions options)
type: azure:storage:ObjectReplication
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 ObjectReplicationArgs
- 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 ObjectReplicationArgs
- 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 ObjectReplicationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ObjectReplicationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ObjectReplicationArgs
- 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 objectReplicationResource = new Azure.Storage.ObjectReplication("objectReplicationResource", new()
{
DestinationStorageAccountId = "string",
Rules = new[]
{
new Azure.Storage.Inputs.ObjectReplicationRuleArgs
{
DestinationContainerName = "string",
SourceContainerName = "string",
CopyBlobsCreatedAfter = "string",
FilterOutBlobsWithPrefixes = new[]
{
"string",
},
Name = "string",
},
},
SourceStorageAccountId = "string",
});
example, err := storage.NewObjectReplication(ctx, "objectReplicationResource", &storage.ObjectReplicationArgs{
DestinationStorageAccountId: pulumi.String("string"),
Rules: storage.ObjectReplicationRuleArray{
&storage.ObjectReplicationRuleArgs{
DestinationContainerName: pulumi.String("string"),
SourceContainerName: pulumi.String("string"),
CopyBlobsCreatedAfter: pulumi.String("string"),
FilterOutBlobsWithPrefixes: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
},
},
SourceStorageAccountId: pulumi.String("string"),
})
var objectReplicationResource = new ObjectReplication("objectReplicationResource", ObjectReplicationArgs.builder()
.destinationStorageAccountId("string")
.rules(ObjectReplicationRuleArgs.builder()
.destinationContainerName("string")
.sourceContainerName("string")
.copyBlobsCreatedAfter("string")
.filterOutBlobsWithPrefixes("string")
.name("string")
.build())
.sourceStorageAccountId("string")
.build());
object_replication_resource = azure.storage.ObjectReplication("objectReplicationResource",
destination_storage_account_id="string",
rules=[{
"destination_container_name": "string",
"source_container_name": "string",
"copy_blobs_created_after": "string",
"filter_out_blobs_with_prefixes": ["string"],
"name": "string",
}],
source_storage_account_id="string")
const objectReplicationResource = new azure.storage.ObjectReplication("objectReplicationResource", {
destinationStorageAccountId: "string",
rules: [{
destinationContainerName: "string",
sourceContainerName: "string",
copyBlobsCreatedAfter: "string",
filterOutBlobsWithPrefixes: ["string"],
name: "string",
}],
sourceStorageAccountId: "string",
});
type: azure:storage:ObjectReplication
properties:
destinationStorageAccountId: string
rules:
- copyBlobsCreatedAfter: string
destinationContainerName: string
filterOutBlobsWithPrefixes:
- string
name: string
sourceContainerName: string
sourceStorageAccountId: string
ObjectReplication Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ObjectReplication resource accepts the following input properties:
- Destination
Storage stringAccount Id - The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.
- Rules
List<Object
Replication Rule> - One or more
rulesblocks as defined below. - Source
Storage stringAccount Id - The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.
- Destination
Storage stringAccount Id - The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.
- Rules
[]Object
Replication Rule Args - One or more
rulesblocks as defined below. - Source
Storage stringAccount Id - The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.
- destination
Storage StringAccount Id - The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.
- rules
List<Object
Replication Rule> - One or more
rulesblocks as defined below. - source
Storage StringAccount Id - The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.
- destination
Storage stringAccount Id - The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.
- rules
Object
Replication Rule[] - One or more
rulesblocks as defined below. - source
Storage stringAccount Id - The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.
- destination_
storage_ straccount_ id - The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.
- rules
Sequence[Object
Replication Rule Args] - One or more
rulesblocks as defined below. - source_
storage_ straccount_ id - The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.
- destination
Storage StringAccount Id - The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.
- rules List<Property Map>
- One or more
rulesblocks as defined below. - source
Storage StringAccount Id - The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the ObjectReplication resource produces the following output properties:
- Destination
Object stringReplication Id - The ID of the Object Replication in the destination storage account.
- Id string
- The provider-assigned unique ID for this managed resource.
- Source
Object stringReplication Id - The ID of the Object Replication in the source storage account.
- Destination
Object stringReplication Id - The ID of the Object Replication in the destination storage account.
- Id string
- The provider-assigned unique ID for this managed resource.
- Source
Object stringReplication Id - The ID of the Object Replication in the source storage account.
- destination
Object StringReplication Id - The ID of the Object Replication in the destination storage account.
- id String
- The provider-assigned unique ID for this managed resource.
- source
Object StringReplication Id - The ID of the Object Replication in the source storage account.
- destination
Object stringReplication Id - The ID of the Object Replication in the destination storage account.
- id string
- The provider-assigned unique ID for this managed resource.
- source
Object stringReplication Id - The ID of the Object Replication in the source storage account.
- destination_
object_ strreplication_ id - The ID of the Object Replication in the destination storage account.
- id str
- The provider-assigned unique ID for this managed resource.
- source_
object_ strreplication_ id - The ID of the Object Replication in the source storage account.
- destination
Object StringReplication Id - The ID of the Object Replication in the destination storage account.
- id String
- The provider-assigned unique ID for this managed resource.
- source
Object StringReplication Id - The ID of the Object Replication in the source storage account.
Look up Existing ObjectReplication Resource
Get an existing ObjectReplication 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?: ObjectReplicationState, opts?: CustomResourceOptions): ObjectReplication@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
destination_object_replication_id: Optional[str] = None,
destination_storage_account_id: Optional[str] = None,
rules: Optional[Sequence[ObjectReplicationRuleArgs]] = None,
source_object_replication_id: Optional[str] = None,
source_storage_account_id: Optional[str] = None) -> ObjectReplicationfunc GetObjectReplication(ctx *Context, name string, id IDInput, state *ObjectReplicationState, opts ...ResourceOption) (*ObjectReplication, error)public static ObjectReplication Get(string name, Input<string> id, ObjectReplicationState? state, CustomResourceOptions? opts = null)public static ObjectReplication get(String name, Output<String> id, ObjectReplicationState state, CustomResourceOptions options)resources: _: type: azure:storage:ObjectReplication get: id: ${id}- 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.
- Destination
Object stringReplication Id - The ID of the Object Replication in the destination storage account.
- Destination
Storage stringAccount Id - The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.
- Rules
List<Object
Replication Rule> - One or more
rulesblocks as defined below. - Source
Object stringReplication Id - The ID of the Object Replication in the source storage account.
- Source
Storage stringAccount Id - The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.
- Destination
Object stringReplication Id - The ID of the Object Replication in the destination storage account.
- Destination
Storage stringAccount Id - The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.
- Rules
[]Object
Replication Rule Args - One or more
rulesblocks as defined below. - Source
Object stringReplication Id - The ID of the Object Replication in the source storage account.
- Source
Storage stringAccount Id - The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.
- destination
Object StringReplication Id - The ID of the Object Replication in the destination storage account.
- destination
Storage StringAccount Id - The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.
- rules
List<Object
Replication Rule> - One or more
rulesblocks as defined below. - source
Object StringReplication Id - The ID of the Object Replication in the source storage account.
- source
Storage StringAccount Id - The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.
- destination
Object stringReplication Id - The ID of the Object Replication in the destination storage account.
- destination
Storage stringAccount Id - The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.
- rules
Object
Replication Rule[] - One or more
rulesblocks as defined below. - source
Object stringReplication Id - The ID of the Object Replication in the source storage account.
- source
Storage stringAccount Id - The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.
- destination_
object_ strreplication_ id - The ID of the Object Replication in the destination storage account.
- destination_
storage_ straccount_ id - The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.
- rules
Sequence[Object
Replication Rule Args] - One or more
rulesblocks as defined below. - source_
object_ strreplication_ id - The ID of the Object Replication in the source storage account.
- source_
storage_ straccount_ id - The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.
- destination
Object StringReplication Id - The ID of the Object Replication in the destination storage account.
- destination
Storage StringAccount Id - The ID of the destination storage account. Changing this forces a new Storage Object Replication to be created.
- rules List<Property Map>
- One or more
rulesblocks as defined below. - source
Object StringReplication Id - The ID of the Object Replication in the source storage account.
- source
Storage StringAccount Id - The ID of the source storage account. Changing this forces a new Storage Object Replication to be created.
Supporting Types
ObjectReplicationRule, ObjectReplicationRuleArgs
- Destination
Container stringName - The destination storage container name. Changing this forces a new Storage Object Replication to be created.
- Source
Container stringName - The source storage container name. Changing this forces a new Storage Object Replication to be created.
- Copy
Blobs stringCreated After - The time after which the Block Blobs created will be copies to the destination. Possible values are
OnlyNewObjects,Everythingand time in RFC3339 format:2006-01-02T15:04:00Z. - Filter
Out List<string>Blobs With Prefixes - Specifies a list of filters prefixes, the blobs whose names begin with which will be replicated.
- Name string
- Destination
Container stringName - The destination storage container name. Changing this forces a new Storage Object Replication to be created.
- Source
Container stringName - The source storage container name. Changing this forces a new Storage Object Replication to be created.
- Copy
Blobs stringCreated After - The time after which the Block Blobs created will be copies to the destination. Possible values are
OnlyNewObjects,Everythingand time in RFC3339 format:2006-01-02T15:04:00Z. - Filter
Out []stringBlobs With Prefixes - Specifies a list of filters prefixes, the blobs whose names begin with which will be replicated.
- Name string
- destination
Container StringName - The destination storage container name. Changing this forces a new Storage Object Replication to be created.
- source
Container StringName - The source storage container name. Changing this forces a new Storage Object Replication to be created.
- copy
Blobs StringCreated After - The time after which the Block Blobs created will be copies to the destination. Possible values are
OnlyNewObjects,Everythingand time in RFC3339 format:2006-01-02T15:04:00Z. - filter
Out List<String>Blobs With Prefixes - Specifies a list of filters prefixes, the blobs whose names begin with which will be replicated.
- name String
- destination
Container stringName - The destination storage container name. Changing this forces a new Storage Object Replication to be created.
- source
Container stringName - The source storage container name. Changing this forces a new Storage Object Replication to be created.
- copy
Blobs stringCreated After - The time after which the Block Blobs created will be copies to the destination. Possible values are
OnlyNewObjects,Everythingand time in RFC3339 format:2006-01-02T15:04:00Z. - filter
Out string[]Blobs With Prefixes - Specifies a list of filters prefixes, the blobs whose names begin with which will be replicated.
- name string
- destination_
container_ strname - The destination storage container name. Changing this forces a new Storage Object Replication to be created.
- source_
container_ strname - The source storage container name. Changing this forces a new Storage Object Replication to be created.
- copy_
blobs_ strcreated_ after - The time after which the Block Blobs created will be copies to the destination. Possible values are
OnlyNewObjects,Everythingand time in RFC3339 format:2006-01-02T15:04:00Z. - filter_
out_ Sequence[str]blobs_ with_ prefixes - Specifies a list of filters prefixes, the blobs whose names begin with which will be replicated.
- name str
- destination
Container StringName - The destination storage container name. Changing this forces a new Storage Object Replication to be created.
- source
Container StringName - The source storage container name. Changing this forces a new Storage Object Replication to be created.
- copy
Blobs StringCreated After - The time after which the Block Blobs created will be copies to the destination. Possible values are
OnlyNewObjects,Everythingand time in RFC3339 format:2006-01-02T15:04:00Z. - filter
Out List<String>Blobs With Prefixes - Specifies a list of filters prefixes, the blobs whose names begin with which will be replicated.
- name String
Import
Storage Object Replication Policies can be imported using the resource id, e.g.
$ pulumi import azure:storage/objectReplication:ObjectReplication example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Storage/storageAccounts/storageAccount1/objectReplicationPolicies/objectReplicationPolicy1;/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group2/providers/Microsoft.Storage/storageAccounts/storageAccount2/objectReplicationPolicies/objectReplicationPolicy2
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
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
