map $geoip2_data_country_iso_code $allowed_country_${name} { default no; %{ for country in allowed_country_list} ${country} yes; %{ endfor ~} } map $allowed_country_${name} $should_log_blocked_${upper(join("_", sort(allowed_country_list)))} { no 1; default 0; }