Hey Vincent.
Not sure I understand.
You currently have traditional mode, so i guess we are talking about encrypt rules…
How we came up with the number of 2000 communities?
How many S2S peers do you have?
We don’t need separated community per tunnel. Single Community can generate many tunnels with many peers…
Anyway I would not try to convert each encrypt rule one by one to a community like script is doing.
I would have understand the topology, map the peers, the encryption settings, NAT, RA to give specific answer so maybe its better to open a ticket and we will take a look.