Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: conditional import #3110

Closed
1 task
froazin opened this issue Aug 25, 2023 · 2 comments
Closed
1 task

Feature request: conditional import #3110

froazin opened this issue Aug 25, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@froazin
Copy link

froazin commented Aug 25, 2023

Description

Description

The ability to import resources to your state with your CDKTF code.

Use Case

For those occasions where you're trying to build onto an existing, potentially complex set of infrastructure. You might have 10's, 100's or even 1000's of resources already out in the wild in an unmanaged state. The idea of manually importing resources via the Terraform CLI doesn't sound very appealing and may not always be practical.

The beauty of CDKTF is that you're able to run a bunch of steps before finally synthesising your stack. This means you can pull data out of existing CMDBs and various other data platforms to describe your infrastructure. In these situations, there is a lot of value in being able to check if a resource in your CMDB is already managed by terraform (just by parsing the state file or maybe you've added an "isManaged" field to your CMDB), and if it is not, import it. Not only are you saving hours upfront if you already have lots of stuff out in the wild, but you're building a safety net for those occasions where correct process has been bypassed by someone. Or in those transitionary phases whereby Terraform is being introduced into an environment, but you're still working out the kinks in your IDP or wherever people will consume the product from, and you'd like people to continue to provision resources the "old" way for a while as a backup.

Apologies

Sorry, I would volunteer to help with this, but Typescript is really not my bag 😂😭 - Yes, I am aware I need to make time and learn it, that will happen one day haha!

References

No response

Help Wanted

  • I'm interested in contributing a fix myself

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@froazin froazin added enhancement New feature or request new Un-triaged issue labels Aug 25, 2023
@froazin
Copy link
Author

froazin commented Aug 25, 2023

Duplicates: #1134

@froazin froazin closed this as completed Aug 25, 2023
@github-actions
Copy link
Contributor

I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 25, 2023
@DanielMSchmidt DanielMSchmidt removed the new Un-triaged issue label Jan 15, 2024
@xiehan xiehan changed the title COMPONENT: conditional import Feature request: conditional import Nov 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants