Hello There,
What will be the best & efficient approach in terms of time & effort to create Terraform/CloudFormation scripts of existing AWS Infrastructure.
Any automated tools or scripts to complete such task !
Thanks.
Hello There,
What will be the best & efficient approach in terms of time & effort to create Terraform/CloudFormation scripts of existing AWS Infrastructure.
Any automated tools or scripts to complete such task !
Thanks.
In my SaaS startup, we initially created infrastructure manually using the AWS GUI. Later, I started using Terraform to manage some critical infrastructure. However, some development-related AWS resources are still managed manually. Should I integrate this new tool into my existing Terraform project, or create a separate project?
This is for Google Cloud and useless for AWS.
Use the terraform “import” statement on resources a bit at the time.
Keep importing and planning without making changes to the infrastructure.
You’ll end up with a statefile and tf files that let you manipulate the infrastructure.
Chances are, that you don’t have hundreds of resources and even if you do, using terraform for the process is easi to control and work with.
Another option is: the IaC generator under Cloudformation.
If you’re saying that’s simply because it’s under the GoogleCloudPlatform GitHub organization, I would suggest you read the documentation. It supports AWS as well. https://github.com/GoogleCloudPlatform/terraformer/blob/master/docs/aws.md
I stand corrected.
For the aws provider, the build in import functionality is pretty good. I’ve used it for surprisingly big systems with great success.
Never works well imho
Cloudformation has a iac generator. Then you can use that cft to tf repo.
I’m a strong proponent of former2. It scans your aws account and then generates you cloudformation/cdk/terraform for each resource. It can also link the resources together where appropriate. I recommend grabbing the open source from github and running it locally as a docker container.
I do this. But augmented with chatgpt. What I do is ask it for the club commands to list the names and IDs of the resources (difficulty varies), then I paste into chatgpt an example import and ask it to write the imports.
Has saved me hours and hours of work and let’s me import large chunks at a time.
https://former2.com/
This will change your life
whoa whoa wait
does this work for terraform?
I use it all the time for Terraform. I work at AWS in professional services.
Honestly, with the new import blocks, it’s fairly easy to just import existing resources manually. I do it a lot.
You should just use the terraform import command if the amount of resources is not excessive. It’s also a good way to learn terraform and discover your infrastructure.
Try former2.com there is cli as welll
We use this tool called firefly. Although it’s licensed. Found it pretty sick and made our job really easy as we had to import resources from almost 30 AWS accounts. It also has other functionalities like to detect drift, compliance checks etc.
Same, but import blocks makes it fly.
I do this a lot also.