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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With