from typing import List


def get_config_indexes(
        config_lines: List[str],
        search_string: str
) -> List[int]:
    """
    Get index for every list entry that matches the provided search string

    Arguments:
        config_lines (List[str]):
            Keepalived config split into lines
        search_string (str):
            The term to search the lines for

    Return:
        A list of integers denoting the index where a value was found

    Example:
        test_list = ["Test", "Value", "Test", "Test", "Stop"]
        index_list = _get_config_indexes(test_list, "Test")
        print(index_list)  # [0, 2, 3]

    This function is used to find the index of each vrrp_instance, but can
    be used to find other indexes. It's useful to know where each group
    in the config starts.
    """

    stripped_lines: List[str] = [x.strip() for x in config_lines]
    config_start_indices: List[int] = [i for i, x in enumerate(stripped_lines)
                                       if search_string in x]
    return config_start_indices