<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Terraform provider backend state in Automations</title>
    <link>https://community.dynatrace.com/t5/Automations/Terraform-provider-backend-state/m-p/300217#M2625</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I agree with &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67382"&gt;@sujit_k_singh&lt;/a&gt;&amp;nbsp;here.&lt;/P&gt;&lt;P&gt;The remote backend, such as S3 or AzureRM, is only the storage layer for the Terraform state. Terraform does not support safely “pushing” or importing resources directly into the backend state file outside of the normal Terraform workflow.&lt;/P&gt;&lt;P&gt;The usual approach would be:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Configure the backend first.&lt;/LI&gt;&lt;LI&gt;Run &lt;FONT color="#FF0000"&gt;terraform init&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;Run &lt;FONT color="#FF0000"&gt;terraform import&lt;/FONT&gt; or use &lt;FONT color="#FF0000"&gt;import&lt;/FONT&gt; blocks.&lt;/LI&gt;&lt;LI&gt;Let Terraform write the imported resources into the configured remote state.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Alternatively, if the import was already done locally, you can configure the remote backend afterwards and migrate the state with:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;terraform init -migrate-state&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;So in short: don’t edit/upload the state manually to S3/AzureRM. Let Terraform CLI manage the state operations.&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jun 2026 13:38:42 GMT</pubDate>
    <dc:creator>t_pawlak</dc:creator>
    <dc:date>2026-06-02T13:38:42Z</dc:date>
    <item>
      <title>Terraform provider backend state</title>
      <link>https://community.dynatrace.com/t5/Automations/Terraform-provider-backend-state/m-p/299408#M2604</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I would like to import state of a set of configurations directly to my backend (s3 bucket / azurerm) but I cannot see any way of tweaking this.&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2026 10:28:45 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Terraform-provider-backend-state/m-p/299408#M2604</guid>
      <dc:creator>tarjei</dc:creator>
      <dc:date>2026-05-13T10:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Terraform provider backend state</title>
      <link>https://community.dynatrace.com/t5/Automations/Terraform-provider-backend-state/m-p/300162#M2619</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/12960"&gt;@tarjei&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;Terraform doesn’t support directly importing state into a backend (S3/AzureRM) outside of its normal workflow.&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;You have two options:&lt;/P&gt;&lt;P&gt;Configure the backend first → run terraform init → then terraform import (this writes directly to remote state)&lt;BR /&gt;Or import locally and migrate using terraform init -migrate-state&lt;/P&gt;&lt;P&gt;Backend is just storage — all state operations must go through Terraform CLI.&lt;/P&gt;&lt;P&gt;Refer this link for more details&lt;/P&gt;&lt;/DIV&gt;&lt;P&gt;&lt;A href="https://support.hashicorp.com/hc/en-us/articles/360061289934-How-to-Import-Resources-into-a-Remote-State-Managed-by-Terraform-Cloud" target="_blank"&gt;How to Import Resources into a Remote State Managed by Terraform Cloud – HashiCorp Help Center&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sujit&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2026 04:43:51 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Terraform-provider-backend-state/m-p/300162#M2619</guid>
      <dc:creator>sujit_k_singh</dc:creator>
      <dc:date>2026-06-02T04:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Terraform provider backend state</title>
      <link>https://community.dynatrace.com/t5/Automations/Terraform-provider-backend-state/m-p/300217#M2625</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I agree with &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/67382"&gt;@sujit_k_singh&lt;/a&gt;&amp;nbsp;here.&lt;/P&gt;&lt;P&gt;The remote backend, such as S3 or AzureRM, is only the storage layer for the Terraform state. Terraform does not support safely “pushing” or importing resources directly into the backend state file outside of the normal Terraform workflow.&lt;/P&gt;&lt;P&gt;The usual approach would be:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Configure the backend first.&lt;/LI&gt;&lt;LI&gt;Run &lt;FONT color="#FF0000"&gt;terraform init&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;Run &lt;FONT color="#FF0000"&gt;terraform import&lt;/FONT&gt; or use &lt;FONT color="#FF0000"&gt;import&lt;/FONT&gt; blocks.&lt;/LI&gt;&lt;LI&gt;Let Terraform write the imported resources into the configured remote state.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Alternatively, if the import was already done locally, you can configure the remote backend afterwards and migrate the state with:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;terraform init -migrate-state&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;So in short: don’t edit/upload the state manually to S3/AzureRM. Let Terraform CLI manage the state operations.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2026 13:38:42 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Terraform-provider-backend-state/m-p/300217#M2625</guid>
      <dc:creator>t_pawlak</dc:creator>
      <dc:date>2026-06-02T13:38:42Z</dc:date>
    </item>
  </channel>
</rss>

