anchor.diff:  -include_lib("eunit/include/eunit.hrl").
   
   logic_case1_tags() ->
  -    [#ec2_tag{resource_id = "A1",
  -              key = "A",
  -              value = "A"},
  -     #ec2_tag{resource_id = "A2",
  -              key = "A",
  -              value = "B"},
  -     #ec2_tag{resource_id = "B1",
  -              key = "B",
  -              value = "A"},
  -     #ec2_tag{resource_id = "C1",
  -              key = "C",
  -              value = "A"},
  -     #ec2_tag{resource_id = "C2",
  -              key = "C",
  -              value = "B"},
  -     #ec2_tag{resource_id = "C3",
  -              key = "C",
  -              value = "C"},
  -     #ec2_tag{resource_id = "C4",
  -              key = "C",
  -              value = "C"},
  -     #ec2_tag{resource_id = "C5",
  -              key = "C",
  -              value = "C"}].
  +    [[{instances_set,
  +       [[{instance_id, "A1"},
  +         {tag_set,
  +          [[{key, "A"}, {value, "A"}]]}],
  +        [{instance_id, "A2"},
  +         {tag_set,
  +          [[{key, "A"}, {value, "B"}]]}]]}],
  +     [{instances_set,
  +       [[{instance_id, "B1"},
  +         {tag_set,
  +          [[{key, "B"}, {value, "A"}]]}]]}],
  +     [{instances_set,
  +       [[{instance_id, "C1"},
  +         {tag_set,
  +          [[{key, "C"}, {value, "A"}]]}],
  +        [{instance_id, "C2"},
  +         {tag_set,
  +          [[{key, "C"}, {value, "B"}]]}],
  +        [{instance_id, "C3"},
  +         {tag_set,
  +          [[{key, "C"}, {value, "C"}]]}],
  +        [{instance_id, "C4"},
  +         {tag_set,
  +          [[{key, "C"}, {value, "C"}]]}],
  +        [{instance_id, "C5"},
  +         {tag_set,
  +          [[{key, "C"}, {value, "C"}]]}]]}]].
   
   logic_case1_tags_preprocess(TagsInput) ->
       true = is_list(TagsInput),
  
positive.code:         ec2_tagged_instances,
          groups :: list(group_value()),
          tags :: list(tag_value()),
          tags_filter :: list({key, list(string())} |
                              {value, list(string())}),
          nodes :: list(node()),
          connect :: visible | hidden
      }).
  
  -define(ERLCLOUD_TAG_VALUE_NULL, " ").
  -define(NULL_EXPRESSION, [{'OR', []}]).
  
  %%%------------------------------------------------------------------------
  
negative.code:             Error
      end.
  
  ec2_tagged_instances_get(#state{tags = ?NULL_EXPRESSION} = State) ->
      {ok, false, State};
  ec2_tagged_instances_get(#state{ec2_instances = EC2Instances,
                                  ec2_tagged_instances = OldResult,
                                  tags = Tags} = State) ->
      case process(Tags, EC2Instances, tag) of
          OldResult ->
              {ok, false, State};
          NewResult ->
              {ok, true, State#state{ec2_tagged_instances = NewResult}}
      end.
  
  update_from_instance(Instance, Hosts) ->
  