Removal of get_resource and Ref in HOT in lieu of enhanced get_attr

Registered by Edmund Troche

Currently the HOT template format has intrinsic functions to get a resource reference/id using the legacy CloudFormation "Ref" function or the new HOT intrinsic function get_resource. These functions return what amounts to be the id (identity) of a resource, which is conceptually the same as an "id" attribute for a given resource. The change I'm proposing is to clean up the HOT template and improve consistency by getting rid of "Ref" and "get_resource" and instead just have "get_attr" fill in this role. With this change doing "Ref: res_name" would be equivalent to "get_attr: [ res_name, id]", which is a few more characters to type, but more consistent.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
Edmund Troche
Direction:
Needs approval
Assignee:
Edmund Troche
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Steve Baker

Related branches

Sprints

Whiteboard

(asalkeld) I am not a fan of "get_resource", can't we just have "ref"? It is the most used function special casing that in the interest of making templates easier to read seems like a good idea to me.
(edmund) Actually, both "get_resource" and "Ref" work right now., and they perform the same operation, i.e. get a reference to a resource. I'm proposing we further simplify things by getting rid of both "get_resource" and "Ref". Both of these functions (Ref and get_resource) end up returning what amounts to the resource id, which is really an attribute of the resource (at least conceptually).

(stevebaker) Late in the havana cycle there was a flurry of activity to remove all id attributes from those native resources that had them. Using id attributes was causing bugs - sorry I can't remember the details right now. I think adding them back would just cause churn at this point. Also we may be adding a "soft dependency" version of get_resource which doesn't have to wait for the resource to be COMPLETE, which is quite different to get_attr behavior.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.