LinkedServer

class LinkedServer : KotlinCustomResource

Manages a Redis Linked Server (ie Geo Location)

Example Usage

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.redis.Cache;
import com.pulumi.azure.redis.CacheArgs;
import com.pulumi.azure.redis.inputs.CacheRedisConfigurationArgs;
import com.pulumi.azure.redis.LinkedServer;
import com.pulumi.azure.redis.LinkedServerArgs;
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_primary = new ResourceGroup("example-primary", ResourceGroupArgs.builder()
.name("example-resources-primary")
.location("East US")
.build());
var example_primaryCache = new Cache("example-primaryCache", CacheArgs.builder()
.name("example-cache1")
.location(example_primary.location())
.resourceGroupName(example_primary.name())
.capacity(1)
.family("P")
.skuName("Premium")
.enableNonSslPort(false)
.redisConfiguration(CacheRedisConfigurationArgs.builder()
.maxmemoryReserved(2)
.maxmemoryDelta(2)
.maxmemoryPolicy("allkeys-lru")
.build())
.build());
var example_secondary = new ResourceGroup("example-secondary", ResourceGroupArgs.builder()
.name("example-resources-secondary")
.location("West US")
.build());
var example_secondaryCache = new Cache("example-secondaryCache", CacheArgs.builder()
.name("example-cache2")
.location(example_secondary.location())
.resourceGroupName(example_secondary.name())
.capacity(1)
.family("P")
.skuName("Premium")
.enableNonSslPort(false)
.redisConfiguration(CacheRedisConfigurationArgs.builder()
.maxmemoryReserved(2)
.maxmemoryDelta(2)
.maxmemoryPolicy("allkeys-lru")
.build())
.build());
var example_link = new LinkedServer("example-link", LinkedServerArgs.builder()
.targetRedisCacheName(example_primaryCache.name())
.resourceGroupName(example_primaryCache.resourceGroupName())
.linkedRedisCacheId(example_secondaryCache.id())
.linkedRedisCacheLocation(example_secondaryCache.location())
.serverRole("Secondary")
.build());
}
}

Import

Redis can be imported using the resource id, e.g.

$ pulumi import azure:redis/linkedServer:LinkedServer example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/redis/cache1/linkedServers/cache2

Properties

Link copied to clipboard

The geo-replicated primary hostname for this linked server.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The ID of the linked Redis cache. Changing this forces a new Redis to be created.

Link copied to clipboard

The location of the linked Redis cache. Changing this forces a new Redis to be created.

Link copied to clipboard
val name: Output<String>

The name of the linked server.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The name of the Resource Group where the Redis caches exists. Changing this forces a new Redis to be created.

Link copied to clipboard
val serverRole: Output<String>

The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created. Possible values are Primary and Secondary.

Link copied to clipboard

The name of Redis cache to link with. Changing this forces a new Redis to be created. (eg The primary role)

Link copied to clipboard
val urn: Output<String>