Skip to content

Import AWS existing resources to terraform

homepage-banner

Configure AWS credentials

aws configure

Import resource with terraformer

Download terraformer of your platform, https://github.com/GoogleCloudPlatform/terraformer/releases

terraformer import aws --resources=ec2_instance,alb,vpc,subnet --regions=us-east-2

Valid resources include

acm
alb
auto_scaling
customer_gateway
datapipeline
devicefarm
docdb
ebs
ec2_instance
eip
elastic_beanstalk
elb
eni
iam
igw
media_store
medialive
nacl
nat
route53
route_table
sg
subnet
transit_gateway
vpc
vpc_peering
vpn_connection
vpn_gateway
workspaces

Reference

  • https://github.com/GoogleCloudPlatform/terraformer
  • https://github.com/cycloidio/terracognita

Disclaimer
  1. License under CC BY-NC 4.0
  2. Copyright issue feedback me#imzye.com, replace # with @
  3. Not all the commands and scripts are tested in production environment, use at your own risk
  4. No personal information is collected.
Feedback