title: Breaking apart one big XML into multiple tf resources
body: <p>I'm planning to create a terraform provider that builds a giant XML file. The service that consumes the XML file only has the 1 big giant XML file as a single resource. Inn the example below, this stitched up xml is the only resource.</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;Main&gt;
      &lt;ChildA Id=&quot;childA&quot;&gt;
          &lt;GrandChildA&gt;&lt;/GrandChildA&gt;
          &lt;GrandChildA&gt;&lt;/GrandChildA&gt;
          &lt;GrandChildA&gt;&lt;/GrandChildA&gt;
      &lt;/ChildA&gt;
      &lt;ChildB Id=&quot;childB&quot;&gt;
          &lt;GrandChildB&gt;
              &lt;GreatGrandChildB&gt;&lt;/GreatGrandChildB&gt;
          &lt;/GrandChildB&gt;
      &lt;/ChildB&gt;
  &lt;/Main&gt;
  </code></pre>
  <p>I wanted to break this apart into smaller pieces, but <code>ChildA</code> and <code>ChildB</code> aren't actual resources in the service and is just part of <code>Main</code>. I can't find any examples in the <a href="https://github.com/hashicorp/terraform-provider-hashicups" rel="nofollow noreferrer">hashicups provider example</a>, and from what i noticed from other providers like <code>aws</code>, <code>azure</code>, <code>kubernetes</code> the resources represent an actual resource in the service.</p>
  <pre><code>resource &quot;main_element&quot; &quot;main_1&quot; {
     childA = child_a_element.child_a_1
     childB = child_b_element.child_b_1
  } 
  
  resource &quot;child_a_element&quot; &quot;child_a_1&quot; {
     id = &quot;childA&quot;
     ... other config here
  }
  
  resource &quot;child_b_element&quot; &quot;child_b_1&quot; {
     id = &quot;childB&quot;
     ... other config here
  }
  </code></pre>
  <p>How do i go about implementing this? Should they be <code>resources</code> or should they be <code>data_sources</code>?</p>