Resources Section

The resources section defines the resources that make up a stack deployed from the template (for example, compute instances, networks, storage volumes).

resources:
  <resource ID>:
    type: <resource type>
    properties:
      <property name>: <property value>
    metadata:
      <resource specific metadata>
    depends_on: <resource ID or list of ID>
    deletion_policy: <deletion policy>

*Depending on the type specified in <resource type>, the definable elements vary. For the <property name> and <property value> that can be used for each <resource type>, refer to "Resource type details".

Element Required Description
<resource ID> Yes Defines a unique resource ID in the template.
type Yes

Specifies the resource type. For example, OS::Nova::Server, etc.

For the specifiable resource types, refer to "Supported resource types".

properties No Specifies a list of resource properties.
<property name> No

Specifies a property name. The name of the properties defined for the resource type can be used.

For details, refer to Resource type details.

<property value> No

Specifies a value using the data type corresponding to a property. This can be specified directly, or via Intrinsic Functions.

For details, refer to Resource type details.

metadata No Specifies the metadata of a resource.
depends_on No Defines the dependency relationship with other resources. For details, refer to Resource dependencies.
deletion_policy No

Specifies the deletion policy of resources. When Delete is specified, the resource entity will be removed on deletion. When Retain is specified, the resource entity will not be removed on deletion. If omitted, Delete will be used.

  • Delete
  • Retain