'Insert the given resource into the stack.'

def add_resource(self, resource):

    template = resource.stack.t
    resource.stack = self
    definition = resource.t.reparse(self.defn, template)
    resource.t = definition
    resource.reparse()
    self.resources[resource.name] = resource
    stk_defn.add_resource(self.defn, definition)
    if (self.t.id is not None):
        self.t.store(self.context)
    resource.store()
