资源编排服务 RFS-模板结构:模板样例

时间:2023-11-01 16:19:21

模板样例

# 应用模板的版本信息tosca_definitions_version: huaweicloud_tosca_version_1_0# 应用模板的描述信息description: Template for deploying a cloudserver.# 输入参数定义inputs:  image:    description: 云服务器使用的镜像ID    type: HuaweiCloud.E CS .Image.Id  instance:    default: 1    description: 创建云服务器数量  subnet:    description: 云服务器子网ID  vpc:    description: 云服务器VPC的IDmappings:  regionMap:    cn-east-3:      flavor: c2.medium      image_id: f2003c7b-99c4-4616-be19-334beaca81b1    cn-north-1:      flavor: c1.medium      image_id: 42f34d95-a538-4d17-be48-e690b48c1643    cn-south-1:      flavor: c1.medium      image_id: a3934478-bfeb-4a02-b257-9089779f0380# 元素对象定义node_templates:  myecs:    type: HuaweiCloud.ECS.CloudServer    properties:      availabilityZone: cn-south-1a      flavor:        get_in_map:          - regionMap          - get_input: HuaweiCloud.Region          - flavor      imageId:        get_in_map:          - regionMap          - get_input: HuaweiCloud.Region          - image_id      instances:        get_input: instance      name: my-ecs      nics:        - subnetId:            get_input: subnet      publicIP:        eip:          bandwidth:            shareType: PER            size: 1          ipType: 5_sbgp      rootVolume:        size: 40        volumeType: SATA      vpcId:        get_input: vpc# 输出参数定义outputs:  ecs-eip:    description: 云服务器公网IP    value:      get_attribute:        - myecs        - publicIps  south-flavor:    description: 在华南区创建虚拟机的规格名称    value:      get_in_map:        - regionMap        - cn-south-1        - flavor
support.huaweicloud.com/tr-aos/aos_01_4006.html