github.com/oam-dev/kubevela@v1.9.11/references/cli/test-data/redis.tf (about) 1 terraform { 2 required_providers { 3 tencentcloud = { 4 source = "tencentcloudstack/tencentcloud" 5 } 6 } 7 } 8 9 resource "tencentcloud_redis_instance" "main" { 10 type_id = 8 11 availability_zone = var.availability_zone 12 name = var.instance_name 13 password = var.user_password 14 mem_size = var.mem_size 15 port = var.port 16 } 17 18 output "DB_IP" { 19 value = tencentcloud_redis_instance.main.ip 20 } 21 22 output "DB_PASSWORD" { 23 value = var.user_password 24 } 25 26 output "DB_PORT" { 27 value = var.port 28 } 29 30 variable "availability_zone" { 31 description = "The available zone ID of an instance to be created." 32 type = string 33 default = "ap-chengdu-1" 34 } 35 36 variable "instance_name" { 37 description = "redis instance name" 38 type = string 39 default = "sample" 40 } 41 42 variable "user_password" { 43 description = "redis instance password" 44 type = string 45 default = "IEfewjf2342rfwfwYYfaked" 46 } 47 48 variable "mem_size" { 49 description = "redis instance memory size" 50 type = number 51 default = 1024 52 } 53 54 variable "port" { 55 description = "The port used to access a redis instance." 56 type = number 57 default = 6379 58 }