<p>I have <a href="https://helm.sh/" rel="nofollow noreferrer">Helm Applciations</a> being deployed with Terraform, using the <code>helm_release</code> resource of Terraform.</p>
<p>Sometimes due to one or more of the following reasons my Kubernetes Pods would start to run in the Kubernetes Cluster, BUT Terraform is unaware of this (due to reason(s) below).</p>
<ul>
<li>Internet Connection Issues</li>
<li>Kubernetes Timeout</li>
<li>Bug in Scipts/Dependencies</li>
</ul>
<p>Is there any way to manually edit/tamper <code>terraform.tfstate</code> OR any way to sync terraform based on the remote environment?</p>

<p>You can edit the terraform state manually but it is highly discouraged. <a href="https://www.terraform.io/docs/state/index.html" rel="noreferrer">See this official documentation</a>.</p>
<p>The <code>terraform state &lt;subcommand&gt; [options] [args]</code> command provides very basic options.</p>
<p>One way is to take a backup of the state files + configuration files and remove the state file. Perform <code>terraform import</code> to resync your config and then state.</p>
<p>When doing this don't forget to take the backups first.</p>
