1. Registry
  2. Packages
  3. Tencentcloud Provider
  4. API Docs
  5. RedisBackupEncrypt
Viewing docs for tencentcloud 1.83.41
published on Friday, Nov 6, 2026 by tencentcloudstack
tencentcloud
Viewing docs for tencentcloud 1.83.41
published on Friday, Nov 6, 2026 by tencentcloudstack

    Provides a resource to manage the backup encryption config of a Redis instance.

    Example Usage

    Enable backup encryption with Tencent Cloud managed key

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.RedisInstance("example", {
        availabilityZone: "ap-guangzhou-3",
        typeId: 7,
        password: "Password@123",
        memSize: 8192,
        redisShardNum: 1,
        redisReplicasNum: 1,
        name: "tf_example",
        port: 6379,
        vpcId: vpc.id,
        subnetId: subnet.id,
    });
    const exampleRedisBackupEncrypt = new tencentcloud.RedisBackupEncrypt("example", {
        instanceId: example.redisInstanceId,
        backupEncrypt: true,
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.RedisInstance("example",
        availability_zone="ap-guangzhou-3",
        type_id=7,
        password="Password@123",
        mem_size=8192,
        redis_shard_num=1,
        redis_replicas_num=1,
        name="tf_example",
        port=6379,
        vpc_id=vpc["id"],
        subnet_id=subnet["id"])
    example_redis_backup_encrypt = tencentcloud.RedisBackupEncrypt("example",
        instance_id=example.redis_instance_id,
        backup_encrypt=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := tencentcloud.NewRedisInstance(ctx, "example", &tencentcloud.RedisInstanceArgs{
    			AvailabilityZone: pulumi.String("ap-guangzhou-3"),
    			TypeId:           pulumi.Float64(7),
    			Password:         pulumi.String("Password@123"),
    			MemSize:          pulumi.Float64(8192),
    			RedisShardNum:    pulumi.Float64(1),
    			RedisReplicasNum: pulumi.Float64(1),
    			Name:             pulumi.String("tf_example"),
    			Port:             pulumi.Float64(6379),
    			VpcId:            pulumi.Any(vpc.Id),
    			SubnetId:         pulumi.Any(subnet.Id),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = tencentcloud.NewRedisBackupEncrypt(ctx, "example", &tencentcloud.RedisBackupEncryptArgs{
    			InstanceId:    example.RedisInstanceId,
    			BackupEncrypt: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Tencentcloud.RedisInstance("example", new()
        {
            AvailabilityZone = "ap-guangzhou-3",
            TypeId = 7,
            Password = "Password@123",
            MemSize = 8192,
            RedisShardNum = 1,
            RedisReplicasNum = 1,
            Name = "tf_example",
            Port = 6379,
            VpcId = vpc.Id,
            SubnetId = subnet.Id,
        });
    
        var exampleRedisBackupEncrypt = new Tencentcloud.RedisBackupEncrypt("example", new()
        {
            InstanceId = example.RedisInstanceId,
            BackupEncrypt = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.RedisInstance;
    import com.pulumi.tencentcloud.RedisInstanceArgs;
    import com.pulumi.tencentcloud.RedisBackupEncrypt;
    import com.pulumi.tencentcloud.RedisBackupEncryptArgs;
    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 RedisInstance("example", RedisInstanceArgs.builder()
                .availabilityZone("ap-guangzhou-3")
                .typeId(7.0)
                .password("Password@123")
                .memSize(8192.0)
                .redisShardNum(1.0)
                .redisReplicasNum(1.0)
                .name("tf_example")
                .port(6379.0)
                .vpcId(vpc.id())
                .subnetId(subnet.id())
                .build());
    
            var exampleRedisBackupEncrypt = new RedisBackupEncrypt("exampleRedisBackupEncrypt", RedisBackupEncryptArgs.builder()
                .instanceId(example.redisInstanceId())
                .backupEncrypt(true)
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:RedisInstance
        properties:
          availabilityZone: ap-guangzhou-3
          typeId: 7
          password: Password@123
          memSize: 8192
          redisShardNum: 1
          redisReplicasNum: 1
          name: tf_example
          port: 6379
          vpcId: ${vpc.id}
          subnetId: ${subnet.id}
      exampleRedisBackupEncrypt:
        type: tencentcloud:RedisBackupEncrypt
        name: example
        properties:
          instanceId: ${example.redisInstanceId}
          backupEncrypt: true
    
    Example coming soon!
    

    Enable backup encryption with user-defined KMS key

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const example = new tencentcloud.RedisBackupEncrypt("example", {
        instanceId: exampleTencentcloudRedisInstance.id,
        backupEncrypt: true,
        encryptKeyType: 1,
        kmsKeyId: "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxx",
        kmsRegion: "ap-guangzhou",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    example = tencentcloud.RedisBackupEncrypt("example",
        instance_id=example_tencentcloud_redis_instance["id"],
        backup_encrypt=True,
        encrypt_key_type=1,
        kms_key_id="xxxxxxx-xxxx-xxxx-xxxx-xxxxxxx",
        kms_region="ap-guangzhou")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.NewRedisBackupEncrypt(ctx, "example", &tencentcloud.RedisBackupEncryptArgs{
    			InstanceId:     pulumi.Any(exampleTencentcloudRedisInstance.Id),
    			BackupEncrypt:  pulumi.Bool(true),
    			EncryptKeyType: pulumi.Float64(1),
    			KmsKeyId:       pulumi.String("xxxxxxx-xxxx-xxxx-xxxx-xxxxxxx"),
    			KmsRegion:      pulumi.String("ap-guangzhou"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Tencentcloud.RedisBackupEncrypt("example", new()
        {
            InstanceId = exampleTencentcloudRedisInstance.Id,
            BackupEncrypt = true,
            EncryptKeyType = 1,
            KmsKeyId = "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxx",
            KmsRegion = "ap-guangzhou",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.RedisBackupEncrypt;
    import com.pulumi.tencentcloud.RedisBackupEncryptArgs;
    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 RedisBackupEncrypt("example", RedisBackupEncryptArgs.builder()
                .instanceId(exampleTencentcloudRedisInstance.id())
                .backupEncrypt(true)
                .encryptKeyType(1.0)
                .kmsKeyId("xxxxxxx-xxxx-xxxx-xxxx-xxxxxxx")
                .kmsRegion("ap-guangzhou")
                .build());
    
        }
    }
    
    resources:
      example:
        type: tencentcloud:RedisBackupEncrypt
        properties:
          instanceId: ${exampleTencentcloudRedisInstance.id}
          backupEncrypt: true
          encryptKeyType: 1
          kmsKeyId: xxxxxxx-xxxx-xxxx-xxxx-xxxxxxx
          kmsRegion: ap-guangzhou
    
    Example coming soon!
    

    API Reference

    This resource interacts with the following TencentCloud APIs:

    Create RedisBackupEncrypt Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RedisBackupEncrypt(name: string, args: RedisBackupEncryptArgs, opts?: CustomResourceOptions);
    @overload
    def RedisBackupEncrypt(resource_name: str,
                           args: RedisBackupEncryptArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def RedisBackupEncrypt(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           backup_encrypt: Optional[bool] = None,
                           instance_id: Optional[str] = None,
                           encrypt_key_type: Optional[float] = None,
                           kms_key_id: Optional[str] = None,
                           kms_region: Optional[str] = None,
                           redis_backup_encrypt_id: Optional[str] = None)
    func NewRedisBackupEncrypt(ctx *Context, name string, args RedisBackupEncryptArgs, opts ...ResourceOption) (*RedisBackupEncrypt, error)
    public RedisBackupEncrypt(string name, RedisBackupEncryptArgs args, CustomResourceOptions? opts = null)
    public RedisBackupEncrypt(String name, RedisBackupEncryptArgs args)
    public RedisBackupEncrypt(String name, RedisBackupEncryptArgs args, CustomResourceOptions options)
    
    type: tencentcloud:RedisBackupEncrypt
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "tencentcloud_redis_backup_encrypt" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args RedisBackupEncryptArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args RedisBackupEncryptArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args RedisBackupEncryptArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RedisBackupEncryptArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RedisBackupEncryptArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    RedisBackupEncrypt Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The RedisBackupEncrypt resource accepts the following input properties:

    BackupEncrypt bool
    Whether to enable backup encryption. true: enable; false: disable.
    InstanceId string
    The ID of redis instance.
    EncryptKeyType double
    Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
    KmsKeyId string
    The KMS key ID.
    KmsRegion string
    The KMS region.
    RedisBackupEncryptId string
    ID of the resource.
    BackupEncrypt bool
    Whether to enable backup encryption. true: enable; false: disable.
    InstanceId string
    The ID of redis instance.
    EncryptKeyType float64
    Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
    KmsKeyId string
    The KMS key ID.
    KmsRegion string
    The KMS region.
    RedisBackupEncryptId string
    ID of the resource.
    backup_encrypt bool
    Whether to enable backup encryption. true: enable; false: disable.
    instance_id string
    The ID of redis instance.
    encrypt_key_type number
    Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
    kms_key_id string
    The KMS key ID.
    kms_region string
    The KMS region.
    redis_backup_encrypt_id string
    ID of the resource.
    backupEncrypt Boolean
    Whether to enable backup encryption. true: enable; false: disable.
    instanceId String
    The ID of redis instance.
    encryptKeyType Double
    Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
    kmsKeyId String
    The KMS key ID.
    kmsRegion String
    The KMS region.
    redisBackupEncryptId String
    ID of the resource.
    backupEncrypt boolean
    Whether to enable backup encryption. true: enable; false: disable.
    instanceId string
    The ID of redis instance.
    encryptKeyType number
    Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
    kmsKeyId string
    The KMS key ID.
    kmsRegion string
    The KMS region.
    redisBackupEncryptId string
    ID of the resource.
    backup_encrypt bool
    Whether to enable backup encryption. true: enable; false: disable.
    instance_id str
    The ID of redis instance.
    encrypt_key_type float
    Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
    kms_key_id str
    The KMS key ID.
    kms_region str
    The KMS region.
    redis_backup_encrypt_id str
    ID of the resource.
    backupEncrypt Boolean
    Whether to enable backup encryption. true: enable; false: disable.
    instanceId String
    The ID of redis instance.
    encryptKeyType Number
    Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
    kmsKeyId String
    The KMS key ID.
    kmsRegion String
    The KMS region.
    redisBackupEncryptId String
    ID of the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RedisBackupEncrypt resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing RedisBackupEncrypt Resource

    Get an existing RedisBackupEncrypt resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: RedisBackupEncryptState, opts?: CustomResourceOptions): RedisBackupEncrypt
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backup_encrypt: Optional[bool] = None,
            encrypt_key_type: Optional[float] = None,
            instance_id: Optional[str] = None,
            kms_key_id: Optional[str] = None,
            kms_region: Optional[str] = None,
            redis_backup_encrypt_id: Optional[str] = None) -> RedisBackupEncrypt
    func GetRedisBackupEncrypt(ctx *Context, name string, id IDInput, state *RedisBackupEncryptState, opts ...ResourceOption) (*RedisBackupEncrypt, error)
    public static RedisBackupEncrypt Get(string name, Input<string> id, RedisBackupEncryptState? state, CustomResourceOptions? opts = null)
    public static RedisBackupEncrypt get(String name, Output<String> id, RedisBackupEncryptState state, CustomResourceOptions options)
    resources:  _:    type: tencentcloud:RedisBackupEncrypt    get:      id: ${id}
    import {
      to = tencentcloud_redis_backup_encrypt.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    BackupEncrypt bool
    Whether to enable backup encryption. true: enable; false: disable.
    EncryptKeyType double
    Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
    InstanceId string
    The ID of redis instance.
    KmsKeyId string
    The KMS key ID.
    KmsRegion string
    The KMS region.
    RedisBackupEncryptId string
    ID of the resource.
    BackupEncrypt bool
    Whether to enable backup encryption. true: enable; false: disable.
    EncryptKeyType float64
    Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
    InstanceId string
    The ID of redis instance.
    KmsKeyId string
    The KMS key ID.
    KmsRegion string
    The KMS region.
    RedisBackupEncryptId string
    ID of the resource.
    backup_encrypt bool
    Whether to enable backup encryption. true: enable; false: disable.
    encrypt_key_type number
    Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
    instance_id string
    The ID of redis instance.
    kms_key_id string
    The KMS key ID.
    kms_region string
    The KMS region.
    redis_backup_encrypt_id string
    ID of the resource.
    backupEncrypt Boolean
    Whether to enable backup encryption. true: enable; false: disable.
    encryptKeyType Double
    Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
    instanceId String
    The ID of redis instance.
    kmsKeyId String
    The KMS key ID.
    kmsRegion String
    The KMS region.
    redisBackupEncryptId String
    ID of the resource.
    backupEncrypt boolean
    Whether to enable backup encryption. true: enable; false: disable.
    encryptKeyType number
    Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
    instanceId string
    The ID of redis instance.
    kmsKeyId string
    The KMS key ID.
    kmsRegion string
    The KMS region.
    redisBackupEncryptId string
    ID of the resource.
    backup_encrypt bool
    Whether to enable backup encryption. true: enable; false: disable.
    encrypt_key_type float
    Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
    instance_id str
    The ID of redis instance.
    kms_key_id str
    The KMS key ID.
    kms_region str
    The KMS region.
    redis_backup_encrypt_id str
    ID of the resource.
    backupEncrypt Boolean
    Whether to enable backup encryption. true: enable; false: disable.
    encryptKeyType Number
    Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
    instanceId String
    The ID of redis instance.
    kmsKeyId String
    The KMS key ID.
    kmsRegion String
    The KMS region.
    redisBackupEncryptId String
    ID of the resource.

    Import

    Redis backup encrypt config can be imported, e.g.

    $ pulumi import tencentcloud:index/redisBackupEncrypt:RedisBackupEncrypt example crs-cqdfdzvt
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud
    Viewing docs for tencentcloud 1.83.41
    published on Friday, Nov 6, 2026 by tencentcloudstack

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial