1. Packages
  2. Azure Classic
  3. API Docs
  4. managedredis
  5. GeoReplication

We recommend using Azure Native.

Azure v6.30.0 published on Thursday, Nov 20, 2025 by Pulumi
azure logo

We recommend using Azure Native.

Azure v6.30.0 published on Thursday, Nov 20, 2025 by Pulumi

    Manages Managed Redis Geo-Replication by linking and unlinking databases in a geo-replication group.

    Note: This resource manages the geo-replication group membership for Managed Redis databases. All databases to be linked must have geo_replication_group_name provided with the same value. Linking will discard cache data and cause temporary outage.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-managedredis",
        location: "West Europe",
    });
    const amr1 = new azure.managedredis.ManagedRedis("amr1", {
        name: "example-managedredis-amr1",
        resourceGroupName: example.name,
        location: "West Europe",
        skuName: "Balanced_B3",
        defaultDatabase: {
            geoReplicationGroupName: "example-geo-group",
        },
    });
    const amr2 = new azure.managedredis.ManagedRedis("amr2", {
        name: "example-managedredis-amr2",
        resourceGroupName: example.name,
        location: "Central US",
        skuName: "Balanced_B3",
        defaultDatabase: {
            geoReplicationGroupName: "example-geo-group",
        },
    });
    const exampleGeoReplication = new azure.managedredis.GeoReplication("example", {
        managedRedisId: amr1.id,
        linkedManagedRedisIds: [amr2.id],
    });
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-managedredis",
        location="West Europe")
    amr1 = azure.managedredis.ManagedRedis("amr1",
        name="example-managedredis-amr1",
        resource_group_name=example.name,
        location="West Europe",
        sku_name="Balanced_B3",
        default_database={
            "geo_replication_group_name": "example-geo-group",
        })
    amr2 = azure.managedredis.ManagedRedis("amr2",
        name="example-managedredis-amr2",
        resource_group_name=example.name,
        location="Central US",
        sku_name="Balanced_B3",
        default_database={
            "geo_replication_group_name": "example-geo-group",
        })
    example_geo_replication = azure.managedredis.GeoReplication("example",
        managed_redis_id=amr1.id,
        linked_managed_redis_ids=[amr2.id])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/managedredis"
    	"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-managedredis"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		amr1, err := managedredis.NewManagedRedis(ctx, "amr1", &managedredis.ManagedRedisArgs{
    			Name:              pulumi.String("example-managedredis-amr1"),
    			ResourceGroupName: example.Name,
    			Location:          pulumi.String("West Europe"),
    			SkuName:           pulumi.String("Balanced_B3"),
    			DefaultDatabase: &managedredis.ManagedRedisDefaultDatabaseArgs{
    				GeoReplicationGroupName: pulumi.String("example-geo-group"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		amr2, err := managedredis.NewManagedRedis(ctx, "amr2", &managedredis.ManagedRedisArgs{
    			Name:              pulumi.String("example-managedredis-amr2"),
    			ResourceGroupName: example.Name,
    			Location:          pulumi.String("Central US"),
    			SkuName:           pulumi.String("Balanced_B3"),
    			DefaultDatabase: &managedredis.ManagedRedisDefaultDatabaseArgs{
    				GeoReplicationGroupName: pulumi.String("example-geo-group"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = managedredis.NewGeoReplication(ctx, "example", &managedredis.GeoReplicationArgs{
    			ManagedRedisId: amr1.ID(),
    			LinkedManagedRedisIds: pulumi.StringArray{
    				amr2.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-managedredis",
            Location = "West Europe",
        });
    
        var amr1 = new Azure.ManagedRedis.ManagedRedis("amr1", new()
        {
            Name = "example-managedredis-amr1",
            ResourceGroupName = example.Name,
            Location = "West Europe",
            SkuName = "Balanced_B3",
            DefaultDatabase = new Azure.ManagedRedis.Inputs.ManagedRedisDefaultDatabaseArgs
            {
                GeoReplicationGroupName = "example-geo-group",
            },
        });
    
        var amr2 = new Azure.ManagedRedis.ManagedRedis("amr2", new()
        {
            Name = "example-managedredis-amr2",
            ResourceGroupName = example.Name,
            Location = "Central US",
            SkuName = "Balanced_B3",
            DefaultDatabase = new Azure.ManagedRedis.Inputs.ManagedRedisDefaultDatabaseArgs
            {
                GeoReplicationGroupName = "example-geo-group",
            },
        });
    
        var exampleGeoReplication = new Azure.ManagedRedis.GeoReplication("example", new()
        {
            ManagedRedisId = amr1.Id,
            LinkedManagedRedisIds = new[]
            {
                amr2.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.managedredis.ManagedRedis;
    import com.pulumi.azure.managedredis.ManagedRedisArgs;
    import com.pulumi.azure.managedredis.inputs.ManagedRedisDefaultDatabaseArgs;
    import com.pulumi.azure.managedredis.GeoReplication;
    import com.pulumi.azure.managedredis.GeoReplicationArgs;
    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-managedredis")
                .location("West Europe")
                .build());
    
            var amr1 = new ManagedRedis("amr1", ManagedRedisArgs.builder()
                .name("example-managedredis-amr1")
                .resourceGroupName(example.name())
                .location("West Europe")
                .skuName("Balanced_B3")
                .defaultDatabase(ManagedRedisDefaultDatabaseArgs.builder()
                    .geoReplicationGroupName("example-geo-group")
                    .build())
                .build());
    
            var amr2 = new ManagedRedis("amr2", ManagedRedisArgs.builder()
                .name("example-managedredis-amr2")
                .resourceGroupName(example.name())
                .location("Central US")
                .skuName("Balanced_B3")
                .defaultDatabase(ManagedRedisDefaultDatabaseArgs.builder()
                    .geoReplicationGroupName("example-geo-group")
                    .build())
                .build());
    
            var exampleGeoReplication = new GeoReplication("exampleGeoReplication", GeoReplicationArgs.builder()
                .managedRedisId(amr1.id())
                .linkedManagedRedisIds(amr2.id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-managedredis
          location: West Europe
      amr1:
        type: azure:managedredis:ManagedRedis
        properties:
          name: example-managedredis-amr1
          resourceGroupName: ${example.name}
          location: West Europe
          skuName: Balanced_B3
          defaultDatabase:
            geoReplicationGroupName: example-geo-group
      amr2:
        type: azure:managedredis:ManagedRedis
        properties:
          name: example-managedredis-amr2
          resourceGroupName: ${example.name}
          location: Central US
          skuName: Balanced_B3
          defaultDatabase:
            geoReplicationGroupName: example-geo-group
      exampleGeoReplication:
        type: azure:managedredis:GeoReplication
        name: example
        properties:
          managedRedisId: ${amr1.id}
          linkedManagedRedisIds:
            - ${amr2.id}
    

    API Providers

    This resource uses the following Azure API Providers:

    • Microsoft.Cache - 2025-07-01

    Create GeoReplication Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new GeoReplication(name: string, args: GeoReplicationArgs, opts?: CustomResourceOptions);
    @overload
    def GeoReplication(resource_name: str,
                       args: GeoReplicationArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def GeoReplication(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       linked_managed_redis_ids: Optional[Sequence[str]] = None,
                       managed_redis_id: Optional[str] = None)
    func NewGeoReplication(ctx *Context, name string, args GeoReplicationArgs, opts ...ResourceOption) (*GeoReplication, error)
    public GeoReplication(string name, GeoReplicationArgs args, CustomResourceOptions? opts = null)
    public GeoReplication(String name, GeoReplicationArgs args)
    public GeoReplication(String name, GeoReplicationArgs args, CustomResourceOptions options)
    
    type: azure:managedredis:GeoReplication
    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 GeoReplicationArgs
    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 GeoReplicationArgs
    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 GeoReplicationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GeoReplicationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GeoReplicationArgs
    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 geoReplicationResource = new Azure.ManagedRedis.GeoReplication("geoReplicationResource", new()
    {
        LinkedManagedRedisIds = new[]
        {
            "string",
        },
        ManagedRedisId = "string",
    });
    
    example, err := managedredis.NewGeoReplication(ctx, "geoReplicationResource", &managedredis.GeoReplicationArgs{
    	LinkedManagedRedisIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	ManagedRedisId: pulumi.String("string"),
    })
    
    var geoReplicationResource = new GeoReplication("geoReplicationResource", GeoReplicationArgs.builder()
        .linkedManagedRedisIds("string")
        .managedRedisId("string")
        .build());
    
    geo_replication_resource = azure.managedredis.GeoReplication("geoReplicationResource",
        linked_managed_redis_ids=["string"],
        managed_redis_id="string")
    
    const geoReplicationResource = new azure.managedredis.GeoReplication("geoReplicationResource", {
        linkedManagedRedisIds: ["string"],
        managedRedisId: "string",
    });
    
    type: azure:managedredis:GeoReplication
    properties:
        linkedManagedRedisIds:
            - string
        managedRedisId: string
    

    GeoReplication 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 GeoReplication resource accepts the following input properties:

    LinkedManagedRedisIds List<string>
    A set of other Managed Redis IDs to link together in the geo-replication group. The ID of this Managed Redis is always included by default and does not need to be provided here. Can contain up to 4 Managed Redis IDs, making up a group of 5 in total. All Managed Redis must have the same geo_replication_group_name configured. Once linked, the geo-replication state of all Managed Redis will be updated.
    ManagedRedisId string
    The ID of the Managed Redis through which geo-replication group will be managed. Linking is reciprocal, if A is linked to B, both A and B will have the same linking state. There is no need to have duplicate azure.managedredis.GeoReplication resources for each. Changing this forces a new resource to be created.
    LinkedManagedRedisIds []string
    A set of other Managed Redis IDs to link together in the geo-replication group. The ID of this Managed Redis is always included by default and does not need to be provided here. Can contain up to 4 Managed Redis IDs, making up a group of 5 in total. All Managed Redis must have the same geo_replication_group_name configured. Once linked, the geo-replication state of all Managed Redis will be updated.
    ManagedRedisId string
    The ID of the Managed Redis through which geo-replication group will be managed. Linking is reciprocal, if A is linked to B, both A and B will have the same linking state. There is no need to have duplicate azure.managedredis.GeoReplication resources for each. Changing this forces a new resource to be created.
    linkedManagedRedisIds List<String>
    A set of other Managed Redis IDs to link together in the geo-replication group. The ID of this Managed Redis is always included by default and does not need to be provided here. Can contain up to 4 Managed Redis IDs, making up a group of 5 in total. All Managed Redis must have the same geo_replication_group_name configured. Once linked, the geo-replication state of all Managed Redis will be updated.
    managedRedisId String
    The ID of the Managed Redis through which geo-replication group will be managed. Linking is reciprocal, if A is linked to B, both A and B will have the same linking state. There is no need to have duplicate azure.managedredis.GeoReplication resources for each. Changing this forces a new resource to be created.
    linkedManagedRedisIds string[]
    A set of other Managed Redis IDs to link together in the geo-replication group. The ID of this Managed Redis is always included by default and does not need to be provided here. Can contain up to 4 Managed Redis IDs, making up a group of 5 in total. All Managed Redis must have the same geo_replication_group_name configured. Once linked, the geo-replication state of all Managed Redis will be updated.
    managedRedisId string
    The ID of the Managed Redis through which geo-replication group will be managed. Linking is reciprocal, if A is linked to B, both A and B will have the same linking state. There is no need to have duplicate azure.managedredis.GeoReplication resources for each. Changing this forces a new resource to be created.
    linked_managed_redis_ids Sequence[str]
    A set of other Managed Redis IDs to link together in the geo-replication group. The ID of this Managed Redis is always included by default and does not need to be provided here. Can contain up to 4 Managed Redis IDs, making up a group of 5 in total. All Managed Redis must have the same geo_replication_group_name configured. Once linked, the geo-replication state of all Managed Redis will be updated.
    managed_redis_id str
    The ID of the Managed Redis through which geo-replication group will be managed. Linking is reciprocal, if A is linked to B, both A and B will have the same linking state. There is no need to have duplicate azure.managedredis.GeoReplication resources for each. Changing this forces a new resource to be created.
    linkedManagedRedisIds List<String>
    A set of other Managed Redis IDs to link together in the geo-replication group. The ID of this Managed Redis is always included by default and does not need to be provided here. Can contain up to 4 Managed Redis IDs, making up a group of 5 in total. All Managed Redis must have the same geo_replication_group_name configured. Once linked, the geo-replication state of all Managed Redis will be updated.
    managedRedisId String
    The ID of the Managed Redis through which geo-replication group will be managed. Linking is reciprocal, if A is linked to B, both A and B will have the same linking state. There is no need to have duplicate azure.managedredis.GeoReplication resources for each. Changing this forces a new resource to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the GeoReplication 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 GeoReplication Resource

    Get an existing GeoReplication 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?: GeoReplicationState, opts?: CustomResourceOptions): GeoReplication
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            linked_managed_redis_ids: Optional[Sequence[str]] = None,
            managed_redis_id: Optional[str] = None) -> GeoReplication
    func GetGeoReplication(ctx *Context, name string, id IDInput, state *GeoReplicationState, opts ...ResourceOption) (*GeoReplication, error)
    public static GeoReplication Get(string name, Input<string> id, GeoReplicationState? state, CustomResourceOptions? opts = null)
    public static GeoReplication get(String name, Output<String> id, GeoReplicationState state, CustomResourceOptions options)
    resources:  _:    type: azure:managedredis:GeoReplication    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.
    The following state arguments are supported:
    LinkedManagedRedisIds List<string>
    A set of other Managed Redis IDs to link together in the geo-replication group. The ID of this Managed Redis is always included by default and does not need to be provided here. Can contain up to 4 Managed Redis IDs, making up a group of 5 in total. All Managed Redis must have the same geo_replication_group_name configured. Once linked, the geo-replication state of all Managed Redis will be updated.
    ManagedRedisId string
    The ID of the Managed Redis through which geo-replication group will be managed. Linking is reciprocal, if A is linked to B, both A and B will have the same linking state. There is no need to have duplicate azure.managedredis.GeoReplication resources for each. Changing this forces a new resource to be created.
    LinkedManagedRedisIds []string
    A set of other Managed Redis IDs to link together in the geo-replication group. The ID of this Managed Redis is always included by default and does not need to be provided here. Can contain up to 4 Managed Redis IDs, making up a group of 5 in total. All Managed Redis must have the same geo_replication_group_name configured. Once linked, the geo-replication state of all Managed Redis will be updated.
    ManagedRedisId string
    The ID of the Managed Redis through which geo-replication group will be managed. Linking is reciprocal, if A is linked to B, both A and B will have the same linking state. There is no need to have duplicate azure.managedredis.GeoReplication resources for each. Changing this forces a new resource to be created.
    linkedManagedRedisIds List<String>
    A set of other Managed Redis IDs to link together in the geo-replication group. The ID of this Managed Redis is always included by default and does not need to be provided here. Can contain up to 4 Managed Redis IDs, making up a group of 5 in total. All Managed Redis must have the same geo_replication_group_name configured. Once linked, the geo-replication state of all Managed Redis will be updated.
    managedRedisId String
    The ID of the Managed Redis through which geo-replication group will be managed. Linking is reciprocal, if A is linked to B, both A and B will have the same linking state. There is no need to have duplicate azure.managedredis.GeoReplication resources for each. Changing this forces a new resource to be created.
    linkedManagedRedisIds string[]
    A set of other Managed Redis IDs to link together in the geo-replication group. The ID of this Managed Redis is always included by default and does not need to be provided here. Can contain up to 4 Managed Redis IDs, making up a group of 5 in total. All Managed Redis must have the same geo_replication_group_name configured. Once linked, the geo-replication state of all Managed Redis will be updated.
    managedRedisId string
    The ID of the Managed Redis through which geo-replication group will be managed. Linking is reciprocal, if A is linked to B, both A and B will have the same linking state. There is no need to have duplicate azure.managedredis.GeoReplication resources for each. Changing this forces a new resource to be created.
    linked_managed_redis_ids Sequence[str]
    A set of other Managed Redis IDs to link together in the geo-replication group. The ID of this Managed Redis is always included by default and does not need to be provided here. Can contain up to 4 Managed Redis IDs, making up a group of 5 in total. All Managed Redis must have the same geo_replication_group_name configured. Once linked, the geo-replication state of all Managed Redis will be updated.
    managed_redis_id str
    The ID of the Managed Redis through which geo-replication group will be managed. Linking is reciprocal, if A is linked to B, both A and B will have the same linking state. There is no need to have duplicate azure.managedredis.GeoReplication resources for each. Changing this forces a new resource to be created.
    linkedManagedRedisIds List<String>
    A set of other Managed Redis IDs to link together in the geo-replication group. The ID of this Managed Redis is always included by default and does not need to be provided here. Can contain up to 4 Managed Redis IDs, making up a group of 5 in total. All Managed Redis must have the same geo_replication_group_name configured. Once linked, the geo-replication state of all Managed Redis will be updated.
    managedRedisId String
    The ID of the Managed Redis through which geo-replication group will be managed. Linking is reciprocal, if A is linked to B, both A and B will have the same linking state. There is no need to have duplicate azure.managedredis.GeoReplication resources for each. Changing this forces a new resource to be created.

    Import

    Managed Redis Database Geo-Replication can be imported using the Managed Redis resource id, e.g.

    $ pulumi import azure:managedredis/geoReplication:GeoReplication example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/redisEnterprise/cluster1
    

    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.
    azure logo

    We recommend using Azure Native.

    Azure v6.30.0 published on Thursday, Nov 20, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate