[openstack-dev] [heat] How to cross-reference resources within OS::Heat::ResourceGroup

Janczuk, Tomasz tomasz.janczuk at hp.com
Tue May 6 19:23:14 UTC 2014


I am trying to create an OS::Heat::ResourceGroup of VMs and assign each VM a floating IP. As far as I know this requires cross-referencing the VM, port, and floating IP resources. How can I do that within a OS::Heat::ResourceGroup definition?

The `port: { get_resource: vm_cluster.vm_port.0 }` below is rejected by Heat.

Any help appreciated.

Thanks,
Tomasz

  vm_cluster:
    type: OS::Heat::ResourceGroup
    properties:
      count: { get_param: num_instances }
      resource_def:
        vm:
          type: OS::Nova::Server
          properties:
            key_name: { get_param: key_name }
            flavor: { get_param: flavor }
            image: { get_param: image }
            networks:
              - port: { get_resource: vm_cluster.vm_port.0 }
        vm_port:
          type: OS::Neutron::Port
          properties:
            network_id: { get_param: private_net_id }
            fixed_ips:
              - subnet_id: { get_param: private_subnet_id }
            security_groups: [{ get_resource: rabbit_security_group }]
        vm_floating_ip:
          type: OS::Neutron::FloatingIP
          properties:
            floating_network_id: { get_param: public_net_id }
            port_id: { get_resource: vm_cluster.vm_port.0 }



More information about the OpenStack-dev mailing list