title: terraform aws_imagebuilder_component needs to be replaced because of script line endings changed
body: <p>I have a terraform &quot;image_builder&quot; module which has an <code>aws_imagebuilder_component</code> resource loading the <code>commands</code> from a <code>ps1</code> script file like so:</p>
  <pre><code>resource &quot;aws_imagebuilder_component&quot; &quot;iissetup&quot; {
    data = yamlencode({
      phases = [{
        name = &quot;build&quot;
        steps = [{
          name   = &quot;setup-iis&quot;
          action = &quot;ExecutePowerShell&quot;
          inputs = {
            commands = split(&quot;\n&quot;, file(&quot;${path.module}/scripts/iis_setup.ps1&quot;))
          }
          onFailure = &quot;Abort&quot;
        }]
      }]
      schemaVersion = 1.0
    })
    name        = &quot;msf-setup-iis&quot;
    description = &quot;Clean up default IIS Site&quot;
    platform    = &quot;Windows&quot;
    version     = &quot;0.0.2&quot;
  }
  </code></pre>
  <p>When I deploy my infrastructure by referencing the module locally - i.e. <code>D:/modules/module</code></p>
  <p>and then decide to switch to the same module but hosted on git (azure git repo)
  terraform complains that it needs to redeploy my component as the line endings have changed.</p>
  <pre><code>module &quot;image_bulder&quot; {
    source      = &quot;git::https://dev.azure.com/myorg/myproject/_git/MyTeam.IaC.Modules//modules/image_builder?ref=main&quot;
    # source      = &quot;D:\\modules\\image_builder&quot;
    ...
  }
  </code></pre>
  <p>when I run <code>terraform apply</code> again I see that terraform will recreate the component:</p>
  <p><a href="https://i.stack.imgur.com/ipkZr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ipkZr.png" alt="enter image description here" /></a></p>
  <p>Is there a way to get around that issue so that terraform ignores those line engines and I do not have to recreate my component when I switch from local to git module?</p>