3 ms·
Does AWS have a way to export your infrastructure to a terraform file? Like if I start doing things via the dashboard and later want to use terraform?
by polishdude20 4y ago
Does AWS have a way to export your infrastructure to a terraform file? Like if I start doing things via the dashboard and later want to use terraform?
- VWWHFSfQ 4y agoTerraform has the ability to import it
- 8organicbits 4y agoIn my experience you need to find each resource one by one, and then import each one. Sometimes by name, some by ARN, some by something else. The import approach is time consuming.
- _petronius 4y agoNo, but Terraform has a way of importing it (via the `terraform import` command), although it is clunky to use for an account with lots of resources. CloudFormation (the AWS-provided IaC product) may have something, though.
- jhugo 4y agoI saw "aws-prod-infrastructure" and "terragen" on the AWS blog recently, which are claimed to solve this. I haven't tried them.
- karmajunkie 4y agoI've used terraformer. It generates a bunch of HCL that's useful but verbose, and you can target certain kinds of resources with it. It'll do in a pinch but can't say I loved it.
- rbanffy 4y agoEvery time I use Terraform I want to make a Lisp dialect that describes cloud infrastructure.
- karmajunkie 4y agoemacs probably has one… :-p
- rbanffy 4y agoEmacs is the best OS I've ever used.