kishaningithub / tf-import-gen

Tool to generate terraform import statements to simplify state migrations from one terraform code base to another
MIT License
13 stars 0 forks source link

Failed to import AWS resources #34

Open kayman-mk opened 1 week ago

kayman-mk commented 1 week ago

Great tool, it saved my day! However I found problems importing some resources.

Resources which can't be imported and shouldn't appear in the output:

random_password shouldn't be imported as it would reveal the password. Seems that the current logic doesn't cause any harm, but I think it is better to remove it too:

import {
      to = random_password.rds_master_password
      id = "none"
    }

Resources which uses the wrong id. Terraform fails on import:

kishaningithub commented 1 week ago

Thanks a lot for submitting an issue with great detail ! Much appreciated! ☺️

Will definitely look into this! 👍

kishaningithub commented 5 days ago

@kayman-mk Have addressed all of the above in PR https://github.com/kishaningithub/tf-import-gen/pull/35 other than random password.

I have some difference of opinions regarding your random_password concern

Do let me know your thoughts.

kishaningithub commented 3 days ago

@kayman-mk Have released a new version (v0.13.1) of go releaser. Do upgrade to the latest and let me know if it addressed all your observations/concerns.