def METHOD_NAME(environment, old_resource_address):
    parts = old_resource_address.split('.')
    address_index_syntax_matcher = re.compile(r'\[(\d+)\]$')
    if parts[:3] == ['module', 'servers', 'aws_instance'] and parts[3].startswith('server'):
        index = int(address_index_syntax_matcher.search(parts[3]).group(1))
        name = server_names[index]
        parts = ['aws_instance', name]
    return '.'.join(parts)