Closed MartinTrifork closed 3 months ago
Hi Martin,
thanks for the report!
What you describe is indeed the intended behavior. We refresh our templates monthly and we keep the names the same so that new machines are created with the latest updates without re-referencing the new version in all configurations where the template is used.
That said, you should be able to create new instances with the newer template versions by employing ignore_changes. Also, this article should provide more guidance.
We hope this helps.
Thank you for your explanation. We tried the ignore_change
and that works for us.
Maybe the information you provided could be added to https://github.com/exoscale/terraform-provider-exoscale/blob/master/docs/data-sources/template.md or to the example?
Thanks for the suggestion, we will do just that https://github.com/exoscale/terraform-provider-exoscale/pull/368
Closing this, don't hesitate to reach out if you need more help.
Current Behavior
The template: "Linux Ubuntu 22.04 LTS 64-bit" gets new template id's when there is a point release (i.e. 22.04.1)
When you have created a compute instance and want to create another one later by increasing the count (after the template id has been changed) Terraform will destroy the old compute instance and will create 2 new ones.
Expected Behavior
The template id shouldn't be changed. New templates should have a new name. For example:
That way if you add a compute instance it won't destroy the old ones.
With the code below I expect that on matter when you run it (in January or September) it will do exactly the same thing.
Steps To Reproduce
The first node was created with template id: 67756dc3-a1de-4abd-abcf-843ef9223bb6 (older Ubuntu 22.04)
By using the following code and changing
toolbox_count
from 1 to 2 it plans to add 2 and destroy one.Probably the destroy and create will happen when you create with Ubuntu 22.04 and later run when 22.04.1 is out
I preferably don't want to add the template id as a variable here. Is there a proper work around?
Provider Version
0.58.0
Terraform Version
1.6.6
Relevant log output