Blueprint properties, attributes, and parameters
Blueprint properties, attributes, and parameters store information that is used in provisioning cloud environments.
Properties
web-server:
type: OS::Nova::Server
properties:
flavor: "small"
image: "14243a29-9662-4b9d-b164-67884876fc91"
key_name: "my_key"
name: "web-server"
availability_zone: "my_zone"
For more information about using properties in blueprints, see Externalizing properties in blueprints. To limit the valid values for parameters, see Adding constraints to blueprint properties and parameters.
Parameters
flavor
, which represents
the size of a provisioned image, and the parameter key_name
, which
represents the security key for a provisioned
image.parameters:
flavor:
type: string
description: Flavor to be used for compute instance
default: "m1.small"
key_name:
type: string
description: Name of key-pair to be used for compute instance
default: "MyKey"
To
refer to these parameters in other places in the blueprint, use the
get_param function. For example, the following code shows a server
node. The properties for the node refer to the parameters in the previous
example.web-server:
type: OS::Nova::Server
properties:
flavor: { get_param: flavor }
image: "14243a29-9662-4b9d-b164-67884876fc91"
key_name: { get_param: key_name }
name: "web-server"
When you provision environments from the blueprint, the parameters appear in the provisioning window. In that window, you can accept the values in the source code or specify new values. To limit the valid values for parameters, see Adding constraints to blueprint properties and parameters.
Attributes
Attributes are output values that are available after provisioning. Attributes are commonly used to provide relevant derived values, such as the IP address of a provisioned instance. For an example of using attributes, see Referring to blueprint properties, attributes, and parameters.
For information on referring to properties, attributes, and parameters, see Externalizing properties in blueprints.