Revision history [back]

This happens when you are using Neutron and have multiple Networks defined (if only one Network exists, the server can be attached to it by default, otherwise it is ambiguous). The solution is to specify a specific Network to attach to. The way to do this depends on the resource type.

For AWS::AutoScaling::AutoScalingGroup resources, add the VPCZoneIdentifier property to the scaling group (not launch configuration) resource, with the value being the UUID of a Neutron Subnet.

For AWS::EC2::Instance resources, the easiest way is to add the property SubnetId to the resource, with the value being the UUID of a Neutron Subnet.

You can pass the Subnet UUID in as a parameter to the template, either through the environment or on the command line, or reference a Subnet created in the template using the OS::Neutron::Subnet resource (note that this requires a Network UUID as a parameter, and the same applies - you can pass it in or create it in the template with an OS::Neutron::Network resource).

If you want to keep your template compatible with CloudFormation, the AWS::EC2::VPC and AWS::EC2::Subnet resources in Heat also return the UUID of a Neutron Network and Subnet, respectively, when they are referenced in a template.

For OS::Nova::Server resources, the syntax is a little more complicated (and powerful), but it looks like this:

    type: OS::Nova::Server
          - network: <Network name or UUID>

Just replace <Network name or UUID> with the Network name or UUID. Again, you can pass it in as a parameter, or reference an OS::Neutron::Network resource in the template.