Resource dependencies

depends_on can be used to define resources with one or more dependencies.

Specify the resource ID for the value.

Example definition of a single dependency:

resources:
  server1:
    type: OS::Nova::Server
    depends_on: server2

  server2:
    type: OS::Nova::Server

Example definition of multiple dependencies:

resources:
  server1:
    type: OS::Nova::Server
    depends_on: [ server2, server3 ]

  server2:
    type: OS::Nova::Server

  server3:
    type: OS::Nova::Server
Note:
  • When depends_on is specified, creation of the dependent resource will wait for the specified resource to be created first.
  • In "Example definition of multiple dependencies", creation of server1 will start after server2 and server3 have been created.