Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.redis.kotlin
import com.pulumi.azure.redis.CacheArgs.builder
import com.pulumi.azure.redis.kotlin.inputs.CacheIdentityArgs
import com.pulumi.azure.redis.kotlin.inputs.CacheIdentityArgsBuilder
import com.pulumi.azure.redis.kotlin.inputs.CachePatchScheduleArgs
import com.pulumi.azure.redis.kotlin.inputs.CachePatchScheduleArgsBuilder
import com.pulumi.azure.redis.kotlin.inputs.CacheRedisConfigurationArgs
import com.pulumi.azure.redis.kotlin.inputs.CacheRedisConfigurationArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Manages a Redis Cache.
* > **Note:** Redis version 4 is being retired and no longer supports creating new instances. Version 4 will be removed in a future release. [Redis Version 4 Retirement](https://learn.microsoft.com/azure/azure-cache-for-redis/cache-retired-features#important-upgrade-timelines)
* ## Example Usage
* This example provisions a Standard Redis Cache.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* // NOTE: the Name used for Redis needs to be globally unique
* const exampleCache = new azure.redis.Cache("example", {
* name: "example-cache",
* location: example.location,
* resourceGroupName: example.name,
* capacity: 2,
* family: "C",
* skuName: "Standard",
* enableNonSslPort: false,
* minimumTlsVersion: "1.2",
* redisConfiguration: {},
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* # NOTE: the Name used for Redis needs to be globally unique
* example_cache = azure.redis.Cache("example",
* name="example-cache",
* location=example.location,
* resource_group_name=example.name,
* capacity=2,
* family="C",
* sku_name="Standard",
* enable_non_ssl_port=False,
* minimum_tls_version="1.2",
* redis_configuration=azure.redis.CacheRedisConfigurationArgs())
* ```
* ```csharp
* 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-resources",
* Location = "West Europe",
* });
* // NOTE: the Name used for Redis needs to be globally unique
* var exampleCache = new Azure.Redis.Cache("example", new()
* {
* Name = "example-cache",
* Location = example.Location,
* ResourceGroupName = example.Name,
* Capacity = 2,
* Family = "C",
* SkuName = "Standard",
* EnableNonSslPort = false,
* MinimumTlsVersion = "1.2",
* RedisConfiguration = null,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/redis"
* "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-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* // NOTE: the Name used for Redis needs to be globally unique
* _, err = redis.NewCache(ctx, "example", &redis.CacheArgs{
* Name: pulumi.String("example-cache"),
* Location: example.Location,
* ResourceGroupName: example.Name,
* Capacity: pulumi.Int(2),
* Family: pulumi.String("C"),
* SkuName: pulumi.String("Standard"),
* EnableNonSslPort: pulumi.Bool(false),
* MinimumTlsVersion: pulumi.String("1.2"),
* RedisConfiguration: nil,
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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 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-resources")
* .location("West Europe")
* .build());
* // NOTE: the Name used for Redis needs to be globally unique
* var exampleCache = new Cache("exampleCache", CacheArgs.builder()
* .name("example-cache")
* .location(example.location())
* .resourceGroupName(example.name())
* .capacity(2)
* .family("C")
* .skuName("Standard")
* .enableNonSslPort(false)
* .minimumTlsVersion("1.2")
* .redisConfiguration()
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* # NOTE: the Name used for Redis needs to be globally unique
* exampleCache:
* type: azure:redis:Cache
* name: example
* properties:
* name: example-cache
* location: ${example.location}
* resourceGroupName: ${example.name}
* capacity: 2
* family: C
* skuName: Standard
* enableNonSslPort: false
* minimumTlsVersion: '1.2'
* redisConfiguration: {}
* ```
*
* ## Relevant Links
* * [Azure Cache for Redis planning](https://docs.microsoft.com/azure/azure-cache-for-redis/cache-planning-faq)
* * [Redis: Available Configuration Settings](https://redis.io/topics/config)
* ## Import
* Redis Cache's can be imported using the `resource id`, e.g.
* ```sh
* $ pulumi import azure:redis/cache:Cache cache1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Cache/redis/cache1
* ```
* @property capacity The size of the Redis cache to deploy. Valid values for a SKU `family` of C (Basic/Standard) are `0, 1, 2, 3, 4, 5, 6`, and for P (Premium) `family` are `1, 2, 3, 4, 5`.
* @property enableNonSslPort Enable the non-SSL port (6379) - disabled by default.
* @property family The SKU family/pricing group to use. Valid values are `C` (for Basic/Standard SKU family) and `P` (for `Premium`)
* @property identity An `identity` block as defined below.
* @property location The location of the resource group. Changing this forces a new resource to be created.
* @property minimumTlsVersion The minimum TLS version. Possible values are `1.0`, `1.1` and `1.2`. Defaults to `1.0`.
* @property name The name of the Redis instance. Changing this forces a new resource to be created.
* @property patchSchedules A list of `patch_schedule` blocks as defined below.
* @property privateStaticIpAddress The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. This argument implies the use of `subnet_id`. Changing this forces a new resource to be created.
* @property publicNetworkAccessEnabled Whether or not public network access is allowed for this Redis Cache. `true` means this resource could be accessed by both public and private endpoint. `false` means only private endpoint access is allowed. Defaults to `true`.
* @property redisConfiguration A `redis_configuration` block as defined below - with some limitations by SKU - defaults/details are shown below.
* @property redisVersion Redis version. Only major version needed. Valid values: `4`, `6`.
* @property replicasPerMaster Amount of replicas to create per master for this Redis Cache.
* > **Note:** Configuring the number of replicas per master is only available when using the Premium SKU and cannot be used in conjunction with shards.
* @property replicasPerPrimary Amount of replicas to create per primary for this Redis Cache. If both `replicas_per_primary` and `replicas_per_master` are set, they need to be equal.
* @property resourceGroupName The name of the resource group in which to create the Redis instance. Changing this forces a new resource to be created.
* @property shardCount *Only available when using the Premium SKU* The number of Shards to create on the Redis Cluster.
* @property skuName The SKU of Redis to use. Possible values are `Basic`, `Standard` and `Premium`.
* > **Note** Downgrading the SKU will force a new resource to be created.
* @property subnetId *Only available when using the Premium SKU* The ID of the Subnet within which the Redis Cache should be deployed. This Subnet must only contain Azure Cache for Redis instances without any other type of resources. Changing this forces a new resource to be created.
* @property tags A mapping of tags to assign to the resource.
* @property tenantSettings A mapping of tenant settings to assign to the resource.
* @property zones Specifies a list of Availability Zones in which this Redis Cache should be located. Changing this forces a new Redis Cache to be created.
* > **Please Note**: Availability Zones are [in Preview and only supported in several regions at this time](https://docs.microsoft.com/azure/availability-zones/az-overview) - as such you must be opted into the Preview to use this functionality. You can [opt into the Availability Zones Preview in the Azure Portal](https://aka.ms/azenroll).
*/
public data class CacheArgs(
public val capacity: Output? = null,
public val enableNonSslPort: Output? = null,
public val family: Output? = null,
public val identity: Output? = null,
public val location: Output? = null,
public val minimumTlsVersion: Output? = null,
public val name: Output? = null,
public val patchSchedules: Output>? = null,
public val privateStaticIpAddress: Output? = null,
public val publicNetworkAccessEnabled: Output? = null,
public val redisConfiguration: Output? = null,
public val redisVersion: Output? = null,
public val replicasPerMaster: Output? = null,
public val replicasPerPrimary: Output? = null,
public val resourceGroupName: Output? = null,
public val shardCount: Output? = null,
public val skuName: Output? = null,
public val subnetId: Output? = null,
public val tags: Output