一、描述
绑定云硬盘到云服务器,产品介绍
二、示例
resource "tencentcloud_cbs_storage_attachment" "attachment" { storage_id = "disk-kdt0sq6m" instance_id = "ins-jqlegd42" delete_with_instance = true}
三、参数说明
| 类型 | 名称 | 数据类型 | 说明 |
| 必填 | region | string | 地域,如:ap-guangzhou,默认使用 provider 中定义的 region 也可以在 resource 中指定地域,覆盖默认设置 |
| 必填 | storage_id | string | 要绑定的 CBS ID |
| 必填 | instance_id | string | 绑定到的云服务器 ID |
| 可选 | availability_zone | string | 可用区 |
| 可选 | count | int | 资源数量,默认为 1 如果为 0 则不创建资源 |
| 可选 | activity_id | int | 计费活动 ID,保留字段 |
| 可选 | delete_with_instance | boolean | 挂载后是否随 cvm 实例一起删除,仅对按量计费云硬盘有效 |
| 生成 | id | string | 资源实例 ID |
| 生成 | create_time | string | 资源创建时间 |