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)
}fn::invoke:
function: azure:managedredis/get:get
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- The name of the Managed Redis instance.
- Resource
Group stringName - The name of the Resource Group where the Managed Redis instance exists.
- Name string
- The name of the Managed Redis instance.
- Resource
Group stringName - The name of the Resource Group where the Managed Redis instance exists.
- name String
- The name of the Managed Redis instance.
- resource
Group StringName - The name of the Resource Group where the Managed Redis instance exists.
- name string
- The name of the Managed Redis instance.
- resource
Group stringName - The name of the Resource Group where the Managed Redis instance exists.
- name str
- The name of the Managed Redis instance.
- resource_
group_ strname - The name of the Resource Group where the Managed Redis instance exists.
- name String
- The name of the Managed Redis instance.
- resource
Group StringName - The name of the Resource Group where the Managed Redis instance exists.
get Result
The following output properties are available:
- Customer
Managed List<GetKeys Customer Managed Key> - A
customer_managed_keyblock as defined below. - Default
Databases List<GetDefault Database> - A
default_databaseblock as defined below. - High
Availability boolEnabled - 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<Get
Identity> - An
identityblock as defined below. - Location string
- The Azure Region where the Managed Redis instance exists.
- Name string
- The name of the Redis module.
- Public
Network stringAccess - The public network access setting for the Managed Redis instance.
- Resource
Group stringName - Sku
Name string - The SKU name of the Managed Redis instance.
- Dictionary<string, string>
- A mapping of tags assigned to the Managed Redis instance.
- Customer
Managed []GetKeys Customer Managed Key - A
customer_managed_keyblock as defined below. - Default
Databases []GetDefault Database - A
default_databaseblock as defined below. - High
Availability boolEnabled - 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
[]Get
Identity - An
identityblock as defined below. - Location string
- The Azure Region where the Managed Redis instance exists.
- Name string
- The name of the Redis module.
- Public
Network stringAccess - The public network access setting for the Managed Redis instance.
- Resource
Group stringName - Sku
Name string - The SKU name of the Managed Redis instance.
- map[string]string
- A mapping of tags assigned to the Managed Redis instance.
- customer
Managed List<GetKeys Customer Managed Key> - A
customer_managed_keyblock as defined below. - default
Databases List<GetDefault Database> - A
default_databaseblock as defined below. - high
Availability BooleanEnabled - 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<Get
Identity> - An
identityblock as defined below. - location String
- The Azure Region where the Managed Redis instance exists.
- name String
- The name of the Redis module.
- public
Network StringAccess - The public network access setting for the Managed Redis instance.
- resource
Group StringName - sku
Name String - The SKU name of the Managed Redis instance.
- Map<String,String>
- A mapping of tags assigned to the Managed Redis instance.
- customer
Managed GetKeys Customer Managed Key[] - A
customer_managed_keyblock as defined below. - default
Databases GetDefault Database[] - A
default_databaseblock as defined below. - high
Availability booleanEnabled - 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
Get
Identity[] - An
identityblock as defined below. - location string
- The Azure Region where the Managed Redis instance exists.
- name string
- The name of the Redis module.
- public
Network stringAccess - The public network access setting for the Managed Redis instance.
- resource
Group stringName - sku
Name string - The SKU name of the Managed Redis instance.
- {[key: string]: string}
- A mapping of tags assigned to the Managed Redis instance.
- customer_
managed_ Sequence[Getkeys Customer Managed Key] - A
customer_managed_keyblock as defined below. - default_
databases Sequence[GetDefault Database] - A
default_databaseblock as defined below. - high_
availability_ boolenabled - 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[Get
Identity] - An
identityblock as defined below. - location str
- The Azure Region where the Managed Redis instance exists.
- name str
- The name of the Redis module.
- public_
network_ straccess - The public network access setting for the Managed Redis instance.
- resource_
group_ strname - sku_
name str - The SKU name of the Managed Redis instance.
- Mapping[str, str]
- A mapping of tags assigned to the Managed Redis instance.
- customer
Managed List<Property Map>Keys - A
customer_managed_keyblock as defined below. - default
Databases List<Property Map> - A
default_databaseblock as defined below. - high
Availability BooleanEnabled - 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
identityblock as defined below. - location String
- The Azure Region where the Managed Redis instance exists.
- name String
- The name of the Redis module.
- public
Network StringAccess - The public network access setting for the Managed Redis instance.
- resource
Group StringName - sku
Name String - The SKU name of the Managed Redis instance.
- Map<String>
- A mapping of tags assigned to the Managed Redis instance.
Supporting Types
GetCustomerManagedKey
- Key
Vault stringKey Id - The ID of the key vault key used for encryption.
- User
Assigned stringIdentity Id - The ID of the User Assigned Identity that has access to the Key Vault Key.
- Key
Vault stringKey Id - The ID of the key vault key used for encryption.
- User
Assigned stringIdentity Id - The ID of the User Assigned Identity that has access to the Key Vault Key.
- key
Vault StringKey Id - The ID of the key vault key used for encryption.
- user
Assigned StringIdentity Id - The ID of the User Assigned Identity that has access to the Key Vault Key.
- key
Vault stringKey Id - The ID of the key vault key used for encryption.
- user
Assigned stringIdentity Id - The ID of the User Assigned Identity that has access to the Key Vault Key.
- key_
vault_ strkey_ id - The ID of the key vault key used for encryption.
- user_
assigned_ stridentity_ id - The ID of the User Assigned Identity that has access to the Key Vault Key.
- key
Vault StringKey Id - The ID of the key vault key used for encryption.
- user
Assigned StringIdentity Id - The ID of the User Assigned Identity that has access to the Key Vault Key.
GetDefaultDatabase
- Access
Keys boolAuthentication Enabled - Whether access key authentication is enabled for the database.
- Client
Protocol string - The client protocol used by the database (either
EncryptedorPlaintext). - Clustering
Policy string - The clustering policy used by the database.
- Eviction
Policy string - The Redis eviction policy used by the database.
- Geo
Replication stringGroup Name - The name of the geo-replication group.
- Geo
Replication List<string>Linked Database Ids - A list of linked database IDs for geo-replication.
- Modules
List<Get
Default Database Module> - A list of
moduleblocks as defined below. - Port int
- The TCP port of the database endpoint.
- Primary
Access stringKey - The Primary Access Key for the Managed Redis Database instance.
- Secondary
Access stringKey - The Secondary Access Key for the Managed Redis Database instance.
- Access
Keys boolAuthentication Enabled - Whether access key authentication is enabled for the database.
- Client
Protocol string - The client protocol used by the database (either
EncryptedorPlaintext). - Clustering
Policy string - The clustering policy used by the database.
- Eviction
Policy string - The Redis eviction policy used by the database.
- Geo
Replication stringGroup Name - The name of the geo-replication group.
- Geo
Replication []stringLinked Database Ids - A list of linked database IDs for geo-replication.
- Modules
[]Get
Default Database Module - A list of
moduleblocks as defined below. - Port int
- The TCP port of the database endpoint.
- Primary
Access stringKey - The Primary Access Key for the Managed Redis Database instance.
- Secondary
Access stringKey - The Secondary Access Key for the Managed Redis Database instance.
- access
Keys BooleanAuthentication Enabled - Whether access key authentication is enabled for the database.
- client
Protocol String - The client protocol used by the database (either
EncryptedorPlaintext). - clustering
Policy String - The clustering policy used by the database.
- eviction
Policy String - The Redis eviction policy used by the database.
- geo
Replication StringGroup Name - The name of the geo-replication group.
- geo
Replication List<String>Linked Database Ids - A list of linked database IDs for geo-replication.
- modules
List<Get
Default Database Module> - A list of
moduleblocks as defined below. - port Integer
- The TCP port of the database endpoint.
- primary
Access StringKey - The Primary Access Key for the Managed Redis Database instance.
- secondary
Access StringKey - The Secondary Access Key for the Managed Redis Database instance.
- access
Keys booleanAuthentication Enabled - Whether access key authentication is enabled for the database.
- client
Protocol string - The client protocol used by the database (either
EncryptedorPlaintext). - clustering
Policy string - The clustering policy used by the database.
- eviction
Policy string - The Redis eviction policy used by the database.
- geo
Replication stringGroup Name - The name of the geo-replication group.
- geo
Replication string[]Linked Database Ids - A list of linked database IDs for geo-replication.
- modules
Get
Default Database Module[] - A list of
moduleblocks as defined below. - port number
- The TCP port of the database endpoint.
- primary
Access stringKey - The Primary Access Key for the Managed Redis Database instance.
- secondary
Access stringKey - The Secondary Access Key for the Managed Redis Database instance.
- access_
keys_ boolauthentication_ enabled - Whether access key authentication is enabled for the database.
- client_
protocol str - The client protocol used by the database (either
EncryptedorPlaintext). - clustering_
policy str - The clustering policy used by the database.
- eviction_
policy str - The Redis eviction policy used by the database.
- geo_
replication_ strgroup_ name - The name of the geo-replication group.
- geo_
replication_ Sequence[str]linked_ database_ ids - A list of linked database IDs for geo-replication.
- modules
Sequence[Get
Default Database Module] - A list of
moduleblocks as defined below. - port int
- The TCP port of the database endpoint.
- primary_
access_ strkey - The Primary Access Key for the Managed Redis Database instance.
- secondary_
access_ strkey - The Secondary Access Key for the Managed Redis Database instance.
- access
Keys BooleanAuthentication Enabled - Whether access key authentication is enabled for the database.
- client
Protocol String - The client protocol used by the database (either
EncryptedorPlaintext). - clustering
Policy String - The clustering policy used by the database.
- eviction
Policy String - The Redis eviction policy used by the database.
- geo
Replication StringGroup Name - The name of the geo-replication group.
- geo
Replication List<String>Linked Database Ids - A list of linked database IDs for geo-replication.
- modules List<Property Map>
- A list of
moduleblocks as defined below. - port Number
- The TCP port of the database endpoint.
- primary
Access StringKey - The Primary Access Key for the Managed Redis Database instance.
- secondary
Access StringKey - The Secondary Access Key for the Managed Redis Database instance.
GetDefaultDatabaseModule
GetIdentity
- Identity
Ids List<string> - A list of User Assigned Managed Identity IDs assigned to the Managed Redis instance.
- Principal
Id string - The Principal ID of the System Assigned Managed Service Identity that is configured on the Managed Redis instance.
- Tenant
Id 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 []string - A list of User Assigned Managed Identity IDs assigned to the Managed Redis instance.
- Principal
Id string - The Principal ID of the System Assigned Managed Service Identity that is configured on the Managed Redis instance.
- Tenant
Id 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 List<String> - A list of User Assigned Managed Identity IDs assigned to the Managed Redis instance.
- principal
Id String - The Principal ID of the System Assigned Managed Service Identity that is configured on the Managed Redis instance.
- tenant
Id 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 string[] - A list of User Assigned Managed Identity IDs assigned to the Managed Redis instance.
- principal
Id string - The Principal ID of the System Assigned Managed Service Identity that is configured on the Managed Redis instance.
- tenant
Id 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.
- identity
Ids List<String> - A list of User Assigned Managed Identity IDs assigned to the Managed Redis instance.
- principal
Id String - The Principal ID of the System Assigned Managed Service Identity that is configured on the Managed Redis instance.
- tenant
Id 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
azurermTerraform Provider.
