[openstack-dev] [Heat] Referencing VPC resources across templates
zbitter at redhat.com
Wed Apr 3 13:37:23 UTC 2013
On 03/04/13 13:56, Simon Pasquier wrote:
> Thanks for the reply.
> I didn't dig much into the AWS documentation but like you pointed out,
> my point was broader than just splitting VpcId & subnet resources. It
> would be cool if Heat could support a template like this one:
Interesting, thanks. We're hampered here by inconsistent documentation,
but it certainly looks from that like it is actually supported in AWS
for this particular case, so it is desirable for Heat also.
More broadly, the implementation of properties such as these in Heat
must be done on a case-by-case basis - there are 3 things required:
- Each resource type needs a sensible ID to return from Ref
- All data required to use the resource needs to be accessible given
only the ID
- Properties that reference the resource need to look it up using the
ID, rather than retrieving it from the local stack
This already works for many of the Resource types in Heat. In some
cases, we have chosen not to implement this because it is not required
and not supported in AWS (an example would be the reference from a
WaitCondition to its WaitConditionHandle).
In other cases, support is simply missing because one or more of the 3
conditions above have not been met (often the hardest part is obtaining
an ID for an AWS resource type that does not have a direct counterpart
in OpenStack). For those cases, bug reports would be most welcome.
> Is it ok to file a bug on Launchpad for this use case?
Yes, please do :)
> 2013/4/3 Zane Bitter <zbitter at redhat.com <mailto:zbitter at redhat.com>>
> On 03/04/13 09:29, Simon Pasquier wrote:
> Let say I have a first template to create a VPC network and
> another one
> to create a subnet associated to that VPC.
> 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?
> You're correct that this is not supported (the VPC must be in the
> same template as the subnet). It also doesn't appear to be supported
> by AWS (the documentation is poor, but it looks like the property
> type is "Ref", not "String") so, unless that proves not to be the
> case, it's extremely unlikely that we would add support for it.
> What AWS _does_ support is creating the subnet in the same template
> as the VPC and then passing the subnet ID to another template in the
> way you describe. Heat doesn't implement the SubnetId property on an
> Instance at all yet, but when it does this is something that ought
> to be allowed IMO.
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.__org
> <mailto:OpenStack-dev at lists.openstack.org>
> http://lists.openstack.org/__cgi-bin/mailman/listinfo/__openstack-dev <http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev>
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
More information about the OpenStack-dev