I'm not sure I understand the loop: shouldn't the rest of the recipe be inside this loop? It sounds to me like we will only configure one resource with the current code (the last one in the list).