title: Terraform refresh from empty state?
body: <p>I am developing a custom Terraform provider for our private cloud, and i struggle with the state file between my builds.</p>
  
  <p>Basically every time i build a new version of the custom provider, i need to perform a <code>terraform init</code>, which seems to wipe out the existing state.</p>
  
  <p>I have some resources that still exist, but Terraform thinks they don't, since its state file is empty.</p>
  
  <p>I tried to perform a <code>terraform refresh</code>, but it doesn't do anything:</p>
  
  <blockquote>
    <p>Empty or non-existent state file.</p>
    
    <p>Refresh will do nothing. Refresh does not error or return an erroneous
    exit status because many automation scripts use refresh, plan, then
    apply and may not have a state file yet for the first run.</p>
  </blockquote>
  
  <p>I saw in the documentation that one can <code>import</code> existing infrastructure, but for this the provider needs to implement the import function.</p>
  
  <p><strong>Is there a way to force Terraform to refresh the state?</strong></p>