一、描述
用于占位的 resource,无实际部署动作,可用于改变资源的部署批次
二、示例
resource "random_password" "db" { length = 16 override_special = "_+-&=!@#$%^*()"}resource "cloudapp_placeholder" "db-placeholder" { text = "用于增加 mysql 的部署批次"}resource "tencentcloud_instance" "main" { availability_zone = var.app_target.availability_zone image_id = "img-eb30mz89" instance_type = "S6.MEDIUM4" vpc_id = var.app_target.vpc_id subnet_id = var.app_target.subnet_id test_text = cloudapp_placeholder.db-placeholder.text}resource "tencentcloud_mysql_instance" "mysql" { availability_zone = var.app_target.availability_zone vpc_id = var.app_target.vpc_id subnet_id = var.app_target.subnet_id cpu = var.app_plan.cpu mem_size = var.app_plan.memory volume_size = 50 instance_name = "cloudapp-mysql" engine_version = "5.7" root_password = random_password.db.result security_groups = [var.app_sg.security_group_id] internet_service = 1 slave_deploy_mode = "0" slave_sync_mode = "0" intranet_port = 3306}
三、参数说明
| 类型 | 名称 | 数据类型 | 说明 |
| 必填 | region | string | 地域,如:ap-guangzhou,默认使用 provider 中定义的 region 也可以在 resource 中指定地域,覆盖默认设置 |
| 可选 | availability_zone | string | 覆盖 BaseSchema 中的必填设置 |
| 可选 | count | int | 资源数量,默认为 1 如果为 0 则不创建资源 |
| 可选 | activity_id | int | 计费活动 ID,保留字段 |
| 可选 | text | string | 文本内容 |
| 生成 | id | string | 资源实例 ID |
| 生成 | create_time | string | 资源创建时间 |