title: How do I import data in one pillar file from another?
body: <p>The situation: We have multiple salt formulas with certain pillar-configured options that, in our environment, are identical. For example, they use the same URL for an upstream service. We would like to avoid duplicating these values in multiple pillar locations (we want a single point of truth), but we don't want to write the formulas in such a manner that they share pillar keys (orthoganality is good for the soul).</p>
  
  <p>It seems to me that the right way to do this is to have one pillar file with the "shared" values and import them from there to the appropriate locations in the formula-specific pillar files. For example:</p>
  
  <pre><code># pillar/shared.sls
  upstream: https://example.com/youarehere
  
  # pillar/formula1.sls
  {%- from shared import upstream %}
  formula1:
    upstream_uri: {{ upstream }}
  
  # pillar/formula2.sls
  {%- from shared import upstream %}
  formula2:
    upstream_url: {{ upstream }}
  
  # and so on...
  </code></pre>
  
  <p>Of course, that doesn't work as written. What's the correct way to do it?</p>