title: How can dynamically create upstream block with Openresty and Lua?
body: <p>I need to create an <code>upstream</code> block in the <code>default.conf</code> dynamically with <strong>Openresty</strong> and <strong>Lua</strong>.</p>
  <pre><code>upstream my_gateway{
  
      for server in #SERVERS_ENV:
         server xxx.xxx.xxx.xx:yyyy  max_fails=3 fail_timeout=30s;
  }
  </code></pre>