def update_agent_properties(input_dict, original_string, secret_name):
    """
        Replace any agent configuration SSH key settings in a provided dict.
    """
    changed = False
    for agent_config_key in ('agent_config', 'cloudify_agent'):
        if agent_config_key in input_dict:
            key = input_dict[agent_config_key].get('key')
            if key == original_string:
                input_dict[agent_config_key]['key'] = {
                    'get_secret': secret_name,
                }
                changed = True
    return changed