node_templates
The node_templates section is mandatory. It defines the set of objects, which are all elements, to be orchestrated in a template. An element can be an application or a cloud service resource.
Format of the node_templates section:
<Element name>: type: <Element type> properties: <Element properties> requirements: <Element dependency> condition: <Condition name>
Property |
Mandatory or Not |
Type |
Value Constraint |
Description |
---|---|---|---|---|
Element name |
Yes |
String |
Enter 1 to 48 characters. Only lowercase letters, digits, and hyphens (-) are allowed. |
Each element name must be unique. |
Element type |
Yes |
HuaweiCloud.*** (*** indicates an element name in the Resource Indexes.) |
- |
This parameter is used to specify the type of an orchestration object. |
Element property |
No |
- |
Property information is expanded based on element types. Each element type has its properties. For more information, see the Resource Indexes. |
The variable of a property can be obtained from the inputs section or by using the get_attribute function. If an element does not require a special property, you do not need to define properties. |
Element dependency |
No |
- |
This parameter is used to specify the name of another element that has a dependency relationship with the current element. |
If there is no relationship between elements, you do not need to define this parameter. The dependency between elements is based on the defined element type. Related dependencies can be defined for specific types.
NOTE:
For example, when a subnet depends on a VPC, define the VPC as a dependent node in the requirements of the subnet. requirements: - vpcId: node: myvpc |
Condition name |
No |
String |
Enter 1 to 64 characters. Only letters, digits, and hyphens (-) are allowed. |
If a condition is defined, the element is deployed only when the condition is met. For more information, see conditions. |
Sample node_templates:
# Definitions of element objects node_templates: myecs: type: HuaweiCloud.ECS.CloudServer properties: availabilityZone: cn-south-1a flavor: c1.medium imageId: a3934478-bfeb-4a02-b257-9089779f0380 instances: 1 name: my-ecs nics: - subnetId: get_input: subnet rootVolume: size: 40 volumeType: SATA vpcId: get_input: vpc
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.