A place for everything, and everything has it's place.
Thus far the examples have all used references by naming the referred resource. It is also possible to define the content of a resource directly inside the referrer. This is called inline referential expansion and is useful when declaring resources that are entirely encapsulated by a resource. The following example for a virtual machine shows how inline expansion can be used to declare disks and nics within a vm (not a complete blueprint):
compute:vm:example:admin_password:(( admin_password ))admin_username:adminusercores:2disks:data:# inline "data" disk definitionsize:256 GBlog:# inline "log" disk definitionsize:64 GBtype:hddmemory:4 GBnics:external:# inline "external" nic definitionfirewall:example-firewallips:-private:type:dynamicpublic:type:staticsubnet:example-publicinternal:# inline "internal" nic definitionips:-private:ip:10.0.100.4type:staticsubnet:example-backendtags:wicked:cool
The property definitions for disks and nics are references, however in this case instead of declaring the disks and nics at the top level of the blueprint and then adding their blueprint name, we can define them directly inside the virtual machine using them.
The order in which the disks and nics are defined in this example determines the order in which they are presented to the consuming resource. All blueprints respect the order of definition.
Inline definitions cannot use the count property to expand. We're working on it...
The inline definitions get expanded by the blueprint loader into their canonical form (and applying autonaming rules), and a classic reference with a fully qualified blueprint path is left behind to connect the resources: