赛事靶机规模化部署(1) 操作步骤 1. 登录控制中心。 2. 在控制台首页搜索“资源编排ROS”,或在左侧产品导航栏选择“管理工具 > 资源编排ROS”,进入资源编排控制台。 3. 在左侧导航栏选择 模板管理。 4. 在模板管理页面,单击创建模板。 5. 本方案模板示例如下(该模板默认基于华东1资源池, 可以根据需要可以进行调整),请参考文档创建模板完成模板配置。 模板目录结构: │ main.tf │ ├───ecs │ main.tf │ variables.tf │ └───vpc main.tf variables.tf 注意:provider版本至少使用2.1.0 main.tf java terraform { requiredproviders { ctyun { source "ctyunit/ctyun" version "2.1.0" } } } provider "ctyun" { azname var.azname } variable "azname" { type string default "cnhuadong1jsnj1Apublicctcloud" description "可用区名称" } variable "vpcname" { type string default "testvpc" description "VPC名称" } variable "subnetname" { type string default "testsubnet" description "子网名称" } variable "cidr" { type list(string) default ["172.18.1.0/24", "172.18.2.0/24"] description "CIDR" } variable "instancename" { type string default "testecs" description "云主机名称" } variable "instancecount" { type number default 4 description "云主机数量" } variable "imageid" { type string default "f9415853b07d4dd8afb7f48e10de151e" description "镜像ID" } variable "flavorname" { type string default "c7.xlarge.2" description "规格名称" } variable "systemdisktype" { type string default "sas" description "系统盘类型" } variable "systemdisksize" { type number default 40 description "系统盘大小" } variable "bandwidth" { type number default 10 description "公网带宽" } variable "passwordseed" { type string default "randompasswordseed" description "随机密码种子" }
来自: