title: How to include a deployment.properties file of environment variables in WSO2 Identity Server?
body: <p>I want to include a properties file of environment variables to better integrate between environments in AWS deployment of WSO2 Identity Server. I could put all the environment variables in line in the wso2server.sh, but it would be better to inject a properties file that has all the variables I need. </p>
  
  <p>I am trying to include:  </p>
  
  <pre><code>-Ddeployment.conf="$CARBON_HOME/repository/conf/etc/dev-env.properties" \
  </code></pre>
  
  <p>in the wso2server.sh where my dev-env.properties has variables that I want to include in the xml configurations. An example being the usr-mgt.xml connection string:</p>
  
  <pre><code>&lt;Property name="ConnectionURL"&gt;${user.mgt.connection.url}&lt;/Property&gt;
  </code></pre>
  
  <p>I could do <code>-Duser.mgt.connection.url="connection-string" \</code> but I have about 20 properties that I currently want to set this way and would prefer to keep them all in one file instead of in line environment variables. I found this <a href="https://medium.com/@shan1024/overriding-configurations-in-wso2-products-using-deployment-properties-file-f096e96f782d" rel="nofollow noreferrer">Medium article</a> 
  describing something like what I am looking for but I'm not sure it's exactly what I want and it was unclear how to implement this. </p>
  
  <p>Do I need to write a Java Util class to read these environment variables from the properties file or is there a simpler way to do this? And if I need a utils class what would that look like? </p>