published on Friday, Nov 6, 2026 by tencentcloudstack
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:
- Read: DescribeBackupEncryptConfig
- Update:
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:
- Backup
Encrypt bool - Whether to enable backup encryption. true: enable; false: disable.
- Instance
Id string - The ID of redis instance.
- Encrypt
Key doubleType - Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
- Kms
Key stringId - The KMS key ID.
- Kms
Region string - The KMS region.
- Redis
Backup stringEncrypt Id - 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 float64Type - Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
- Kms
Key stringId - The KMS key ID.
- Kms
Region string - The KMS region.
- Redis
Backup stringEncrypt Id - 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_ numbertype - Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
- kms_
key_ stringid - The KMS key ID.
- kms_
region string - The KMS region.
- redis_
backup_ stringencrypt_ id - ID of the resource.
- backup
Encrypt Boolean - Whether to enable backup encryption. true: enable; false: disable.
- instance
Id String - The ID of redis instance.
- encrypt
Key DoubleType - Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
- kms
Key StringId - The KMS key ID.
- kms
Region String - The KMS region.
- redis
Backup StringEncrypt Id - ID of the resource.
- backup
Encrypt boolean - Whether to enable backup encryption. true: enable; false: disable.
- instance
Id string - The ID of redis instance.
- encrypt
Key numberType - Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
- kms
Key stringId - The KMS key ID.
- kms
Region string - The KMS region.
- redis
Backup stringEncrypt Id - 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_ floattype - Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
- kms_
key_ strid - The KMS key ID.
- kms_
region str - The KMS region.
- redis_
backup_ strencrypt_ id - ID of the resource.
- backup
Encrypt Boolean - Whether to enable backup encryption. true: enable; false: disable.
- instance
Id String - The ID of redis instance.
- encrypt
Key NumberType - Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
- kms
Key StringId - The KMS key ID.
- kms
Region String - The KMS region.
- redis
Backup StringEncrypt Id - 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) -> RedisBackupEncryptfunc 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.
- Backup
Encrypt bool - Whether to enable backup encryption. true: enable; false: disable.
- Encrypt
Key doubleType - Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
- Instance
Id string - The ID of redis instance.
- Kms
Key stringId - The KMS key ID.
- Kms
Region string - The KMS region.
- Redis
Backup stringEncrypt Id - ID of the resource.
- Backup
Encrypt bool - Whether to enable backup encryption. true: enable; false: disable.
- Encrypt
Key float64Type - Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
- Instance
Id string - The ID of redis instance.
- Kms
Key stringId - The KMS key ID.
- Kms
Region string - The KMS region.
- Redis
Backup stringEncrypt Id - ID of the resource.
- backup_
encrypt bool - Whether to enable backup encryption. true: enable; false: disable.
- encrypt_
key_ numbertype - Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
- instance_
id string - The ID of redis instance.
- kms_
key_ stringid - The KMS key ID.
- kms_
region string - The KMS region.
- redis_
backup_ stringencrypt_ id - ID of the resource.
- backup
Encrypt Boolean - Whether to enable backup encryption. true: enable; false: disable.
- encrypt
Key DoubleType - Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
- instance
Id String - The ID of redis instance.
- kms
Key StringId - The KMS key ID.
- kms
Region String - The KMS region.
- redis
Backup StringEncrypt Id - ID of the resource.
- backup
Encrypt boolean - Whether to enable backup encryption. true: enable; false: disable.
- encrypt
Key numberType - Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
- instance
Id string - The ID of redis instance.
- kms
Key stringId - The KMS key ID.
- kms
Region string - The KMS region.
- redis
Backup stringEncrypt Id - ID of the resource.
- backup_
encrypt bool - Whether to enable backup encryption. true: enable; false: disable.
- encrypt_
key_ floattype - Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
- instance_
id str - The ID of redis instance.
- kms_
key_ strid - The KMS key ID.
- kms_
region str - The KMS region.
- redis_
backup_ strencrypt_ id - ID of the resource.
- backup
Encrypt Boolean - Whether to enable backup encryption. true: enable; false: disable.
- encrypt
Key NumberType - Encryption key type. 0: Tencent Cloud managed (default); 1: user-defined KMS key.
- instance
Id String - The ID of redis instance.
- kms
Key StringId - The KMS key ID.
- kms
Region String - The KMS region.
- redis
Backup StringEncrypt Id - 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
tencentcloudTerraform Provider.
published on Friday, Nov 6, 2026 by tencentcloudstack