Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I import existing AWS resources into Terraspace?

Importing resources from Terraform is straight forward using "terraform import" syntax. However, there's no documentation for terraspace on this matter. Their docs only talks about how to import existing Terraform state files into Terraspace by moving it to S3 and configuring the backend so that Terraspace can seamlessly pick up the already existing tfstate file.

Does anyone know how I can import existing infrastructure into Terraspace? I have some existing infrastructure in AWS that I would like to import and managed by Terraspace going forward.

like image 282
Alex Avatar asked Oct 21 '25 23:10

Alex


1 Answers

You can use the normal Terraform commands from within the BUILD_DIR (most likely in .terraspace-cache///stacks/); i.e.

TS_ENV=dev terraspace plan discombobulator
cd .terraspace-cache/us-east-1/dev/stacks/discombobulator
terraform state list aws_resource.foo
terraform import aws_resource.foo foo_id
like image 107
pilchkinstein Avatar answered Oct 24 '25 20:10

pilchkinstein



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!