Import existing AWS resources to terraform
Terraform is an Infrastructure as Code (IaC) tool that allows you to define and manage your infrastructure in a declarative manner. While creating new resources in AWS using Terraform is straightforward, importing existing resources can be a bit tricky. In this blog post, we will discuss how to import existing AWS resources to Terraform.
Configure AWS credentials
Import resource with terraformer
terraformer of your platform,
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
Small world. Big idea!
- Welcome to visit the knowledge base of SRE and DevOps!
- License under CC BY-NC 4.0
- No personal information is collected
- Made with Material for MkDocs and generative AI tools
- Copyright issue feedback me#imzye.com, replace # with @
- Get latest SRE news and discuss on Discord Channel