Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Resource dependencies can be created using depends_on. Doc.

By causing the floating IP to depend on the router's internal interface, the resources will be created in appropriate order.

Example:

resources:
  private_network_r:
    type: OS::Neutron::Net
    properties:
      name: { get_param: private_network }

  private_subnet_r:
    type: OS::Neutron::Subnet
    properties:
      name: {get_param: private_network }
      network_id: { get_resource: private_network_r }
      cidr: { get_param: subnet_cidr }
      dns_nameservers: [ "1.1.1.1" ]
      ip_version: 4

  internal_router:
    type: OS::Neutron::Router
    properties:
      external_gateway_info:
        network: { get_param: public_network }

  server_port:
    type: OS::Neutron::Port
    properties:
      network: { get_resource: private_network_r }
      security_groups: ["default", { get_resource: security_group } ]

  floating_ip:
    type: OS::Neutron::FloatingIP
    depends_on:
      - internal_interface
    properties:
      floating_network: { get_param: public_network }
      port_id: { get_resource: server_port }