[openstack-dev] [Heat] Referencing VPC resources across templates
sbaker at redhat.com
Thu Apr 4 01:01:51 UTC 2013
On 04/04/2013 12:21 PM, Zane Bitter wrote:
>>> I want to pass the VpcId value as a parameter to the second template
>>> but the stack creation fails. Looking at the code, this use case
>>> doesn't seem to be supported.
>>> Am I right? If yes, is it something planned for a future release?
>> What version of Heat are you running? There was actually a change
>> released in grizzly-rc1 which addressed this issue:
> The issue is that it's then looked up using stack.resource_by_refid(),
> which only looks at resources in the current stack:
> That's used to get the router_id from the VPC resource's metadata.
> What you need is to use the supplied ID (which is the network_id)
> directly so that you don't need to access the VPC resource at all. I
> have no idea if that's possible with Quantum.
Yes, a VPC consists of a Quantum net plus a router, but outside of Heat
the net and router are not coupled so it will currently not be possible
to pass in a VpcId.
As an aside, if your templates are only going to be run on OpenStack I
would recommend using the native quantum resources instead of VPC. The
VPC resource types are there so that you can support AWS and OpenStack
in a single template.
More information about the OpenStack-dev