I created 2 EC2 instances using terraform. Is there any way to attach them into auto scaling group using terraform? I didn't find anything about this in the docs :/
I don't want to create them within the ASG, only attached them. As I said the instances were generated by terraform script as well as everything else (ASG, SG...).
Thank you
Unfortunately this is not possible via Terraform directly
However you could run the attach-instances AWS cli command.
If this needed to be performed in terraform you could put the command into a local-exec resource.
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