'Change the resource_id of the tags according to the input param.
Because this method can be called multiple times when more than one
instance is booted in a single request it makes a copy of the tags
list.
:param tags: TagList object.
:param resource_id: string.
:returns: TagList object.'

def _transform_tags(self, tags, resource_id):

    instance_tags = tags.obj_clone()
    for tag in instance_tags:
        tag.resource_id = resource_id
    return instance_tags
