def init_subnet( c, vpc_id, cidr ):
    """
        Takes VPCConnection object, which is actually a connection to a
        region, and a CIDR block string. Looks for our subnet in that region.
        If subnet does not exist, creates it.  Returns the subnet resource
        object on success, raises exception on failure.
    """
    # look for our VPC
    all_subnets = c.get_all_subnets()
    found = False
    our_subnet = None
    for s in all_subnets:
        if s.cidr_block == cidr:
            #print "Found subnet {}".format(cidr)
            our_subnet = s
            found = True
            break
    if not found:
        our_subnet = c.create_subnet( vpc_id, cidr )

    return our_subnet