<p>If Backend for TFstate is going to be same then there is no need to <code>terraform import</code>. You can simply change it to <code>resource</code> from <code>module</code> just make sure all the configurations you mention in <code>resource</code> are same as the <code>module</code></p>

CC BY-SA 4.0
2024-05-01T08:13:47.897Z
Hi, thanks, I will try that out
Miloš Milutinov
CC BY-SA 4.0
2024-05-01T13:49:01.307Z
Sure! It should just work fine with the same configuration as the module.
MadaraUchiha
CC BY-SA 4.0
2024-04-29T11:23:09.193Z
2024-04-29T11:23:09.193Z
MadaraUchiha
<p>I have a resource created using official AWS terraform module, like:</p>
<pre><code>module &quot;my-module&quot; {
    source = &quot;terraform-aws-modules/efs/aws&quot;
}
</code></pre>
<p>Now, I want to convert that to a resource, like:</p>
<pre><code>resource &quot;my-resource&quot; {
}
</code></pre>
<p>Which I want to be an EFS. I already have an EFS created through module, official one, not my custom one. Is there a way to perform <code>terraform import</code> and replace module with resource in this case?</p>

<terraform><terraform-module>
Importing resource to replace terraform official module
Miloš Milutinov
# Importing resource to replace terraform official module

(Asked by: username_0 on 2024-04-23)

I have a resource created using official AWS terraform module, like:
module "my-module" {
    source = "terraform-aws-modules/efs/aws"
}

Now, I want to convert that to a resource, like:
resource "my-resource" {
}

Which I want to be an EFS. I already have an EFS created through module, official one, not my custom one. Is there a way to perform terraform import and replace module with resource in this case?

**Tags:** terraform, terraform-module


---

## 1 answers

### Answer by username_1 on 2024-04-29. Score: 0

If Backend for TFstate is going to be same then there is no need to `terraform import`. You can simply change it to `resource` from `module` just make sure all the configurations you mention in `resource` are same as the `module`

> **Comments:**
> **username_0**: Hi, thanks, I will try that out  
> **username_1**: Sure! It should just work fine with the same configuration as the module.  

---

