一、描述
镜像缓存,产品介绍
二、示例
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 | 实例名 |
四、参数说明
| 类型 | 名称 | 数据类型 |
| 必填 | server | string |
| 必填 | username | string |
| 必填 | password | string |
| 可选 | name | string |