Conditionally create resources when a for_each loop is involved

2 posts were split to a new topic: For_each with an extra condition