[Heat] Reg Creation of resource based on another resource attribute value
Hi Team , I want to create the openstack subnet resource based on the openstack network resource's attribute STATUS value. i.e Create neutron subnet only when the neutron network status is ACTIVE . I can see currently the support of get_Attr function is not there in conditions section .Also the depends_on function accepts input as resource ids only .I cant pass a condition there . Is there any other way to implement the same .Please suggest . Thanks, A.Nanthini
On 27/08/20 7:09 am, NANTHINI A A wrote:
Hi Team ,
   I want to create the openstack subnet resource based on the openstack network resource’s attribute STATUS value.
  i.e Create neutron subnet only when the neutron network status is ACTIVE .
  I can see currently the support of get_Attr function is not there in conditions section .
Correct, and that's because they're evaluated at different times. When you create (or update) the stack Heat decides immediately which resources are enabled. But the attribute values are not known until after that resource is created.
Also the depends_on function accepts input as resource ids only .I cant pass a condition there .
I believe you can depend on a resource that is conditionally disabled without causing an error.
  Is there any other way to implement the same .Please suggest .
There isn't. cheers, Zane.
participants (2)
-
NANTHINI A A
-
Zane Bitter