tencentcloud_tke_image_cache

最近更新时间:2025-09-04 14:56:13

我的收藏

描述

镜像缓存,产品介绍

示例

resource "tencentcloud_tke_image_cache" "image_cache" {
availability_zone = var.app_target.availability_zone
vpc_id = var.app_target.vpc.id
subnet_id = var.app_target.subnet.id
images = [
"ccr.ccs.tencentyun.com/cloudapp/cloudapp-demo"
]
image_registry_credentials {
server = ""
username = ""
password = ""
name = ""
}
}

参数说明

类型
名称
数据类型
说明
必填
region
string
地域,如:ap-guangzhou,默认使用 provider 中定义的 region 也可以在 resource 中指定地域,覆盖默认设置
images
string[]
用于制作镜像缓存的容器镜像列表
vpc_id
string
VPC ID
subnet_id
string
子网 ID
可选
availability_zone
string
可用区
count
int
资源数量,默认为 1 如果为 0 则不创建资源
activity_id
int
计费活动 ID,保留字段
image_registry_credentials
Schema[]
镜像仓库凭证数组
Schema 类型详见:ImageRegistryCredentialsSchema
image_cache_size
int
镜像缓存的大小。默认为20GiB。取值范围参考云硬盘类型中的高性能云盘类型的大小限制。
retention_days
int
镜像缓存保留时间天数,过期将会自动清理,默认为0,永不过期。
生成
id
string
资源实例 ID
create_time
string
资源创建时间
name
string
实例名

数据结构

ImageRegistryCredentialsSchema

参数说明

类型
名称
数据类型
必填
server
string
username
string
password
string
可选
name
string