Azure Redis Linked Server

This page shows how to write Terraform and Azure Resource Manager for Redis Linked Server and write them securely.

azurerm_redis_linked_server (Terraform)

The Linked Server in Redis can be configured in Terraform with the resource name azurerm_redis_linked_server. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub

main.tf#L1
resource "azurerm_redis_linked_server" "default" {
  linked_redis_cache_id       = var.linked_redis_cache_id
  linked_redis_cache_location = var.linked_redis_cache_location
  target_redis_cache_name     = var.target_redis_cache_name
  resource_group_name         = var.resource_group_name
  server_role                 = var.server_role

Review your Terraform file for Azure best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Manages a Redis Linked Server (ie Geo Location)

Microsoft.Cache/Redis/linkedServers (Azure Resource Manager)

The Redis/linkedServers in Microsoft.Cache can be configured in Azure Resource Manager with the resource name Microsoft.Cache/Redis/linkedServers. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

RedisCacheLinkedServer_List.json#L14
          "type": "Microsoft.Cache/Redis/linkedServers",
          "properties": {
            "linkedRedisCacheId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2",
            "linkedRedisCacheLocation": "West US",
            "provisioningState": "Succeeded",
            "serverRole": "Secondary"
RedisCacheLinkedServer_List.json#L14
          "type": "Microsoft.Cache/Redis/linkedServers",
          "properties": {
            "linkedRedisCacheId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2",
            "linkedRedisCacheLocation": "West US",
            "provisioningState": "Succeeded",
            "serverRole": "Secondary"
RedisCacheLinkedServer_List.json#L14
          "type": "Microsoft.Cache/Redis/linkedServers",
          "properties": {
            "linkedRedisCacheId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2",
            "linkedRedisCacheLocation": "West US",
            "provisioningState": "Succeeded",
            "serverRole": "Secondary"
RedisCacheLinkedServer_List.json#L14
          "type": "Microsoft.Cache/Redis/linkedServers",
          "properties": {
            "linkedRedisCacheId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2",
            "linkedRedisCacheLocation": "West US",
            "provisioningState": "Succeeded",
            "serverRole": "Secondary"
RedisCacheLinkedServer_List.json#L14
          "type": "Microsoft.Cache/Redis/linkedServers",
          "properties": {
            "linkedRedisCacheId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2",
            "linkedRedisCacheLocation": "West US",
            "provisioningState": "Succeeded",
            "serverRole": "Secondary"
RedisCacheLinkedServer_List.json#L14
          "type": "Microsoft.Cache/Redis/linkedServers",
          "properties": {
            "linkedRedisCacheId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2",
            "linkedRedisCacheLocation": "West US",
            "provisioningState": "Succeeded",
            "serverRole": "Secondary"
RedisCacheLinkedServer_List.json#L14
          "type": "Microsoft.Cache/Redis/linkedServers",
          "properties": {
            "linkedRedisCacheId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2",
            "linkedRedisCacheLocation": "West US",
            "provisioningState": "Succeeded",
            "serverRole": "Secondary"
RedisCacheLinkedServer_List.json#L14
          "type": "Microsoft.Cache/Redis/linkedServers",
          "properties": {
            "linkedRedisCacheId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2",
            "linkedRedisCacheLocation": "West US",
            "provisioningState": "Succeeded",
            "serverRole": "Secondary"
RedisCacheLinkedServer_List.json#L14
          "type": "Microsoft.Cache/Redis/linkedServers",
          "properties": {
            "linkedRedisCacheId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2",
            "linkedRedisCacheLocation": "West US",
            "provisioningState": "Succeeded",
            "serverRole": "Secondary"
RedisCacheLinkedServer_Create.json#L21
        "type": "Microsoft.Cache/Redis/linkedServers",
        "properties": {
          "linkedRedisCacheId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Cache/Redis/cache2",
          "linkedRedisCacheLocation": "West US",
          "provisioningState": "Creating",
          "serverRole": "Secondary"

Frequently asked questions

What is Azure Redis Linked Server?

Azure Redis Linked Server is a resource for Redis of Microsoft Azure. Settings can be wrote in Terraform.

Where can I find the example code for the Azure Redis Linked Server?

For Terraform, the vijay-project/terra_action source code example is useful. See the Terraform Example section for further details.

For Azure Resource Manager, the yuncmsft/swagger, yuncmsft/swagger and yuncmsft/swagger source code examples are useful. See the Azure Resource Manager Example section for further details.