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

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

    Use this data source to access information about an existing Managed Redis instance.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = azure.managedredis.get({
        name: "example-managed-redis",
        resourceGroupName: "example-resources",
    });
    export const managedRedisHostname = example.then(example => example.hostname);
    export const managedRedisPrimaryAccessKey = example.then(example => example.defaultDatabases?.[0]?.primaryAccessKey);
    export const managedRedisSecondaryAccessKey = example.then(example => example.defaultDatabases?.[0]?.secondaryAccessKey);
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.managedredis.get(name="example-managed-redis",
        resource_group_name="example-resources")
    pulumi.export("managedRedisHostname", example.hostname)
    pulumi.export("managedRedisPrimaryAccessKey", example.default_databases[0].primary_access_key)
    pulumi.export("managedRedisSecondaryAccessKey", example.default_databases[0].secondary_access_key)
    
    package main
    
    import (
    	"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 := managedredis.Get(ctx, &managedredis.GetArgs{
    			Name:              "example-managed-redis",
    			ResourceGroupName: "example-resources",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("managedRedisHostname", example.Hostname)
    		ctx.Export("managedRedisPrimaryAccessKey", example.DefaultDatabases[0].PrimaryAccessKey)
    		ctx.Export("managedRedisSecondaryAccessKey", example.DefaultDatabases[0].SecondaryAccessKey)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Azure.ManagedRedis.Get.Invoke(new()
        {
            Name = "example-managed-redis",
            ResourceGroupName = "example-resources",
        });
    
        return new Dictionary<string, object?>
        {
            ["managedRedisHostname"] = example.Apply(getResult => getResult.Hostname),
            ["managedRedisPrimaryAccessKey"] = example.Apply(getResult => getResult.DefaultDatabases[0]?.PrimaryAccessKey),
            ["managedRedisSecondaryAccessKey"] = example.Apply(getResult => getResult.DefaultDatabases[0]?.SecondaryAccessKey),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.managedredis.ManagedredisFunctions;
    import com.pulumi.azure.managedredis.inputs.GetArgs;
    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) {
            final var example = ManagedredisFunctions.get(GetArgs.builder()
                .name("example-managed-redis")
                .resourceGroupName("example-resources")
                .build());
    
            ctx.export("managedRedisHostname", example.hostname());
            ctx.export("managedRedisPrimaryAccessKey", example.defaultDatabases()[0].primaryAccessKey());
            ctx.export("managedRedisSecondaryAccessKey", example.defaultDatabases()[0].secondaryAccessKey());
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: azure:managedredis:get
          arguments:
            name: example-managed-redis
            resourceGroupName: example-resources
    outputs:
      managedRedisHostname: ${example.hostname}
      managedRedisPrimaryAccessKey: ${example.defaultDatabases[0].primaryAccessKey}
      managedRedisSecondaryAccessKey: ${example.defaultDatabases[0].secondaryAccessKey}
    

    API Providers

    This data source uses the following Azure API Providers:

    • Microsoft.Cache - 2025-07-01

    Using get

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function get(args: GetArgs, opts?: InvokeOptions): Promise<GetResult>
    function getOutput(args: GetOutputArgs, opts?: InvokeOptions): Output<GetResult>
    def get(name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            opts: Optional[InvokeOptions] = None) -> GetResult
    def get_output(name: Optional[pulumi.Input[str]] = None,
            resource_group_name: Optional[pulumi.Input[str]] = None,
            opts: Optional[InvokeOptions] = None) -> Output[GetResult]
    func Get(ctx *Context, args *GetArgs, opts ...InvokeOption) (*GetResult, error)
    func GetOutput(ctx *Context, args *GetOutputArgs, opts ...InvokeOption) GetResultOutput

    > Note: This function is named Get in the Go SDK.

    public static class Get 
    {
        public static Task<GetResult> InvokeAsync(GetArgs args, InvokeOptions? opts = null)
        public static Output<GetResult> Invoke(GetInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetResult> get(GetArgs args, InvokeOptions options)
    public static Output<GetResult> get(GetArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure:managedredis/get:get
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the Managed Redis instance.
    ResourceGroupName string
    The name of the Resource Group where the Managed Redis instance exists.
    Name string
    The name of the Managed Redis instance.
    ResourceGroupName string
    The name of the Resource Group where the Managed Redis instance exists.
    name String
    The name of the Managed Redis instance.
    resourceGroupName String
    The name of the Resource Group where the Managed Redis instance exists.
    name string
    The name of the Managed Redis instance.
    resourceGroupName string
    The name of the Resource Group where the Managed Redis instance exists.
    name str
    The name of the Managed Redis instance.
    resource_group_name str
    The name of the Resource Group where the Managed Redis instance exists.
    name String
    The name of the Managed Redis instance.
    resourceGroupName String
    The name of the Resource Group where the Managed Redis instance exists.

    get Result

    The following output properties are available:

    CustomerManagedKeys List<GetCustomerManagedKey>
    A customer_managed_key block as defined below.
    DefaultDatabases List<GetDefaultDatabase>
    A default_database block as defined below.
    HighAvailabilityEnabled bool
    Whether high availability is enabled for the Managed Redis instance.
    Hostname string
    The DNS hostname of the Managed Redis instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identities List<GetIdentity>
    An identity block as defined below.
    Location string
    The Azure Region where the Managed Redis instance exists.
    Name string
    The name of the Redis module.
    PublicNetworkAccess string
    The public network access setting for the Managed Redis instance.
    ResourceGroupName string
    SkuName string
    The SKU name of the Managed Redis instance.
    Tags Dictionary<string, string>
    A mapping of tags assigned to the Managed Redis instance.
    CustomerManagedKeys []GetCustomerManagedKey
    A customer_managed_key block as defined below.
    DefaultDatabases []GetDefaultDatabase
    A default_database block as defined below.
    HighAvailabilityEnabled bool
    Whether high availability is enabled for the Managed Redis instance.
    Hostname string
    The DNS hostname of the Managed Redis instance.
    Id string
    The provider-assigned unique ID for this managed resource.
    Identities []GetIdentity
    An identity block as defined below.
    Location string
    The Azure Region where the Managed Redis instance exists.
    Name string
    The name of the Redis module.
    PublicNetworkAccess string
    The public network access setting for the Managed Redis instance.
    ResourceGroupName string
    SkuName string
    The SKU name of the Managed Redis instance.
    Tags map[string]string
    A mapping of tags assigned to the Managed Redis instance.
    customerManagedKeys List<GetCustomerManagedKey>
    A customer_managed_key block as defined below.
    defaultDatabases List<GetDefaultDatabase>
    A default_database block as defined below.
    highAvailabilityEnabled Boolean
    Whether high availability is enabled for the Managed Redis instance.
    hostname String
    The DNS hostname of the Managed Redis instance.
    id String
    The provider-assigned unique ID for this managed resource.
    identities List<GetIdentity>
    An identity block as defined below.
    location String
    The Azure Region where the Managed Redis instance exists.
    name String
    The name of the Redis module.
    publicNetworkAccess String
    The public network access setting for the Managed Redis instance.
    resourceGroupName String
    skuName String
    The SKU name of the Managed Redis instance.
    tags Map<String,String>
    A mapping of tags assigned to the Managed Redis instance.
    customerManagedKeys GetCustomerManagedKey[]
    A customer_managed_key block as defined below.
    defaultDatabases GetDefaultDatabase[]
    A default_database block as defined below.
    highAvailabilityEnabled boolean
    Whether high availability is enabled for the Managed Redis instance.
    hostname string
    The DNS hostname of the Managed Redis instance.
    id string
    The provider-assigned unique ID for this managed resource.
    identities GetIdentity[]
    An identity block as defined below.
    location string
    The Azure Region where the Managed Redis instance exists.
    name string
    The name of the Redis module.
    publicNetworkAccess string
    The public network access setting for the Managed Redis instance.
    resourceGroupName string
    skuName string
    The SKU name of the Managed Redis instance.
    tags {[key: string]: string}
    A mapping of tags assigned to the Managed Redis instance.
    customer_managed_keys Sequence[GetCustomerManagedKey]
    A customer_managed_key block as defined below.
    default_databases Sequence[GetDefaultDatabase]
    A default_database block as defined below.
    high_availability_enabled bool
    Whether high availability is enabled for the Managed Redis instance.
    hostname str
    The DNS hostname of the Managed Redis instance.
    id str
    The provider-assigned unique ID for this managed resource.
    identities Sequence[GetIdentity]
    An identity block as defined below.
    location str
    The Azure Region where the Managed Redis instance exists.
    name str
    The name of the Redis module.
    public_network_access str
    The public network access setting for the Managed Redis instance.
    resource_group_name str
    sku_name str
    The SKU name of the Managed Redis instance.
    tags Mapping[str, str]
    A mapping of tags assigned to the Managed Redis instance.
    customerManagedKeys List<Property Map>
    A customer_managed_key block as defined below.
    defaultDatabases List<Property Map>
    A default_database block as defined below.
    highAvailabilityEnabled Boolean
    Whether high availability is enabled for the Managed Redis instance.
    hostname String
    The DNS hostname of the Managed Redis instance.
    id String
    The provider-assigned unique ID for this managed resource.
    identities List<Property Map>
    An identity block as defined below.
    location String
    The Azure Region where the Managed Redis instance exists.
    name String
    The name of the Redis module.
    publicNetworkAccess String
    The public network access setting for the Managed Redis instance.
    resourceGroupName String
    skuName String
    The SKU name of the Managed Redis instance.
    tags Map<String>
    A mapping of tags assigned to the Managed Redis instance.

    Supporting Types

    GetCustomerManagedKey

    KeyVaultKeyId string
    The ID of the key vault key used for encryption.
    UserAssignedIdentityId string
    The ID of the User Assigned Identity that has access to the Key Vault Key.
    KeyVaultKeyId string
    The ID of the key vault key used for encryption.
    UserAssignedIdentityId string
    The ID of the User Assigned Identity that has access to the Key Vault Key.
    keyVaultKeyId String
    The ID of the key vault key used for encryption.
    userAssignedIdentityId String
    The ID of the User Assigned Identity that has access to the Key Vault Key.
    keyVaultKeyId string
    The ID of the key vault key used for encryption.
    userAssignedIdentityId string
    The ID of the User Assigned Identity that has access to the Key Vault Key.
    key_vault_key_id str
    The ID of the key vault key used for encryption.
    user_assigned_identity_id str
    The ID of the User Assigned Identity that has access to the Key Vault Key.
    keyVaultKeyId String
    The ID of the key vault key used for encryption.
    userAssignedIdentityId String
    The ID of the User Assigned Identity that has access to the Key Vault Key.

    GetDefaultDatabase

    AccessKeysAuthenticationEnabled bool
    Whether access key authentication is enabled for the database.
    ClientProtocol string
    The client protocol used by the database (either Encrypted or Plaintext).
    ClusteringPolicy string
    The clustering policy used by the database.
    EvictionPolicy string
    The Redis eviction policy used by the database.
    GeoReplicationGroupName string
    The name of the geo-replication group.
    GeoReplicationLinkedDatabaseIds List<string>
    A list of linked database IDs for geo-replication.
    Modules List<GetDefaultDatabaseModule>
    A list of module blocks as defined below.
    Port int
    The TCP port of the database endpoint.
    PrimaryAccessKey string
    The Primary Access Key for the Managed Redis Database instance.
    SecondaryAccessKey string
    The Secondary Access Key for the Managed Redis Database instance.
    AccessKeysAuthenticationEnabled bool
    Whether access key authentication is enabled for the database.
    ClientProtocol string
    The client protocol used by the database (either Encrypted or Plaintext).
    ClusteringPolicy string
    The clustering policy used by the database.
    EvictionPolicy string
    The Redis eviction policy used by the database.
    GeoReplicationGroupName string
    The name of the geo-replication group.
    GeoReplicationLinkedDatabaseIds []string
    A list of linked database IDs for geo-replication.
    Modules []GetDefaultDatabaseModule
    A list of module blocks as defined below.
    Port int
    The TCP port of the database endpoint.
    PrimaryAccessKey string
    The Primary Access Key for the Managed Redis Database instance.
    SecondaryAccessKey string
    The Secondary Access Key for the Managed Redis Database instance.
    accessKeysAuthenticationEnabled Boolean
    Whether access key authentication is enabled for the database.
    clientProtocol String
    The client protocol used by the database (either Encrypted or Plaintext).
    clusteringPolicy String
    The clustering policy used by the database.
    evictionPolicy String
    The Redis eviction policy used by the database.
    geoReplicationGroupName String
    The name of the geo-replication group.
    geoReplicationLinkedDatabaseIds List<String>
    A list of linked database IDs for geo-replication.
    modules List<GetDefaultDatabaseModule>
    A list of module blocks as defined below.
    port Integer
    The TCP port of the database endpoint.
    primaryAccessKey String
    The Primary Access Key for the Managed Redis Database instance.
    secondaryAccessKey String
    The Secondary Access Key for the Managed Redis Database instance.
    accessKeysAuthenticationEnabled boolean
    Whether access key authentication is enabled for the database.
    clientProtocol string
    The client protocol used by the database (either Encrypted or Plaintext).
    clusteringPolicy string
    The clustering policy used by the database.
    evictionPolicy string
    The Redis eviction policy used by the database.
    geoReplicationGroupName string
    The name of the geo-replication group.
    geoReplicationLinkedDatabaseIds string[]
    A list of linked database IDs for geo-replication.
    modules GetDefaultDatabaseModule[]
    A list of module blocks as defined below.
    port number
    The TCP port of the database endpoint.
    primaryAccessKey string
    The Primary Access Key for the Managed Redis Database instance.
    secondaryAccessKey string
    The Secondary Access Key for the Managed Redis Database instance.
    access_keys_authentication_enabled bool
    Whether access key authentication is enabled for the database.
    client_protocol str
    The client protocol used by the database (either Encrypted or Plaintext).
    clustering_policy str
    The clustering policy used by the database.
    eviction_policy str
    The Redis eviction policy used by the database.
    geo_replication_group_name str
    The name of the geo-replication group.
    geo_replication_linked_database_ids Sequence[str]
    A list of linked database IDs for geo-replication.
    modules Sequence[GetDefaultDatabaseModule]
    A list of module blocks as defined below.
    port int
    The TCP port of the database endpoint.
    primary_access_key str
    The Primary Access Key for the Managed Redis Database instance.
    secondary_access_key str
    The Secondary Access Key for the Managed Redis Database instance.
    accessKeysAuthenticationEnabled Boolean
    Whether access key authentication is enabled for the database.
    clientProtocol String
    The client protocol used by the database (either Encrypted or Plaintext).
    clusteringPolicy String
    The clustering policy used by the database.
    evictionPolicy String
    The Redis eviction policy used by the database.
    geoReplicationGroupName String
    The name of the geo-replication group.
    geoReplicationLinkedDatabaseIds List<String>
    A list of linked database IDs for geo-replication.
    modules List<Property Map>
    A list of module blocks as defined below.
    port Number
    The TCP port of the database endpoint.
    primaryAccessKey String
    The Primary Access Key for the Managed Redis Database instance.
    secondaryAccessKey String
    The Secondary Access Key for the Managed Redis Database instance.

    GetDefaultDatabaseModule

    Args string
    The configuration options for the module.
    Name string
    The name of the Managed Redis instance.
    Version string
    The version of the module.
    Args string
    The configuration options for the module.
    Name string
    The name of the Managed Redis instance.
    Version string
    The version of the module.
    args String
    The configuration options for the module.
    name String
    The name of the Managed Redis instance.
    version String
    The version of the module.
    args string
    The configuration options for the module.
    name string
    The name of the Managed Redis instance.
    version string
    The version of the module.
    args str
    The configuration options for the module.
    name str
    The name of the Managed Redis instance.
    version str
    The version of the module.
    args String
    The configuration options for the module.
    name String
    The name of the Managed Redis instance.
    version String
    The version of the module.

    GetIdentity

    IdentityIds List<string>
    A list of User Assigned Managed Identity IDs assigned to the Managed Redis instance.
    PrincipalId string
    The Principal ID of the System Assigned Managed Service Identity that is configured on the Managed Redis instance.
    TenantId string
    The Tenant ID of the System Assigned Managed Service Identity that is configured on the Managed Redis instance.
    Type string
    The type of Managed Service Identity configured on the Managed Redis instance.
    IdentityIds []string
    A list of User Assigned Managed Identity IDs assigned to the Managed Redis instance.
    PrincipalId string
    The Principal ID of the System Assigned Managed Service Identity that is configured on the Managed Redis instance.
    TenantId string
    The Tenant ID of the System Assigned Managed Service Identity that is configured on the Managed Redis instance.
    Type string
    The type of Managed Service Identity configured on the Managed Redis instance.
    identityIds List<String>
    A list of User Assigned Managed Identity IDs assigned to the Managed Redis instance.
    principalId String
    The Principal ID of the System Assigned Managed Service Identity that is configured on the Managed Redis instance.
    tenantId String
    The Tenant ID of the System Assigned Managed Service Identity that is configured on the Managed Redis instance.
    type String
    The type of Managed Service Identity configured on the Managed Redis instance.
    identityIds string[]
    A list of User Assigned Managed Identity IDs assigned to the Managed Redis instance.
    principalId string
    The Principal ID of the System Assigned Managed Service Identity that is configured on the Managed Redis instance.
    tenantId string
    The Tenant ID of the System Assigned Managed Service Identity that is configured on the Managed Redis instance.
    type string
    The type of Managed Service Identity configured on the Managed Redis instance.
    identity_ids Sequence[str]
    A list of User Assigned Managed Identity IDs assigned to the Managed Redis instance.
    principal_id str
    The Principal ID of the System Assigned Managed Service Identity that is configured on the Managed Redis instance.
    tenant_id str
    The Tenant ID of the System Assigned Managed Service Identity that is configured on the Managed Redis instance.
    type str
    The type of Managed Service Identity configured on the Managed Redis instance.
    identityIds List<String>
    A list of User Assigned Managed Identity IDs assigned to the Managed Redis instance.
    principalId String
    The Principal ID of the System Assigned Managed Service Identity that is configured on the Managed Redis instance.
    tenantId String
    The Tenant ID of the System Assigned Managed Service Identity that is configured on the Managed Redis instance.
    type String
    The type of Managed Service Identity configured on the Managed Redis instance.

    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