Ask Your Question

Revision history [back]

Can you reverse generate a HOT template from an existing stack?

I see numerous API calls that could be used to piece this together, but I was wondering if something already existed. I see the heat resource-template command that generates a skeleton HOT doc. heat resource-list, resource-show which provide some of the data.

it would be nice to be able to re-baseline your stack(s) to account for situations where people might use the dashboard or direct api calls to implement changes without your knowledge.

click to hide/show revision 2
No.2 Revision

Can you reverse generate a HOT template from an existing stack?

I see numerous API calls that could be used to piece this together, but I was wondering if something already existed. I see the heat resource-template command that generates a skeleton HOT doc. heat resource-list, resource-show which provide some of the data.

it would be nice to be able to re-baseline your stack(s) to account for situations where people might use the dashboard or direct api calls to implement changes without your knowledge.

Update

This is excellent information. Thank you. The question we were grappling with was how to manage the change process and what to establish as the source document for the implementations.

Since we are on this topic the other question I had was their any intention to add a function in the template (or maybe it exists and I have missed it) to allow the orchestrator to query the api from within the HOT document? We anticipate having some very large and complex ecommerce environments. Managing all that from a single HOT document may get a little unwieldy.

When working within the template it is easy enough to reference things you need for the various resource services using get_resource: the_resource. If I have two templates, let's say one is for the full size web experience and the other manages the mobile part of my application, and I need to cross reference between the two for shared resources then I have to resort to knowing the uuid's for those resources if they did not originate in my template. I can't reference them by an easily remembered name. I understand the reason for this is that the resource-name namespace is not guaranteed to be unique (unless, maybe, at the stack level?). Yet in very large projects it would be very nice to be able to reference resources created outside the template by a name rather than a uuid.

Maybe this exists and I've just overlooked it (wouldn't be the 10th time :-) ). It would be nice to have something like:

get_resource: {namespace}:resource-name

We've considered creating some sort of pre-compiler for the HOT doc to do something like this and enforce the namespace ourselves. Your thoughts would be appreciated and thanks again for the first answer.

Can you reverse generate a HOT template from an existing stack?

I see numerous API calls that could be used to piece this together, but I was wondering if something already existed. I see the heat resource-template command that generates a skeleton HOT doc. heat resource-list, resource-show which provide some of the data.

it would be nice to be able to re-baseline your stack(s) to account for situations where people might use the dashboard or direct api calls to implement changes without your knowledge.

Update

This is excellent information. Thank you. The question we were grappling with was how to manage the change process and what to establish as the source document for the implementations.

Since we are on this topic the other question I had was their any intention to add a function in the template (or maybe it exists and I have missed it) to allow the orchestrator to query the api from within the HOT document? We anticipate having some very large and complex ecommerce environments. Managing all that from a single HOT document may get a little unwieldy.

When working within the template it is easy enough to reference things you need for the various resource services using get_resource: the_resource. If I have two templates, let's say one is for the full size web experience and the other manages the mobile part of my application, and I need to cross reference between the two for shared resources then I have to resort to knowing the uuid's for those resources if they did not originate in my template. I can't reference them by an easily remembered name. I understand the reason for this is that the resource-name namespace is not guaranteed to be unique (unless, maybe, at the stack level?). Yet in very large projects it would be very nice to be able to reference resources created outside the template by a name rather than a uuid.

Maybe this exists and I've just overlooked it (wouldn't be the 10th time :-) ). It would be nice to have something like:

get_resource: {namespace}:resource-name

We've considered creating some sort of pre-compiler for the HOT doc to do something like this and enforce the namespace ourselves. Your thoughts would be appreciated and thanks again for the first answer.