Answer the question
In order to leave comments, you need to log in
Scaling in terraform. How?
Can you please tell me how to raise new instances of virtual machines over the original ones?
If I write a terraform plan, I see that all instances will be deleted and new ones will be created instead. How to avoid this and create further so that after VM-30 VM-31 is created and so on.
Answer the question
In order to leave comments, you need to log in
the same terraform plan will tell you why it wants to replace instances - what parameters of the common configuration for instances have changed if it is impossible to replace them on the fly
If you change an important element in the configuration that cannot be replaced without recreating the instance, it must be ignored through the lifecycle -> ignore changes
However, this way you can potentially only get an increase in the number of objects.
If you are deploying to AWS, then ASG can help - it does not re-create instances unnecessarily when adding the required number of instances. When scaled down, the base policy for deleting instances is to delete the oldest one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question