-
-
Notifications
You must be signed in to change notification settings - Fork 60
fix: Ignore alias IP changes #367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Commitlint-CheckThanks for your contribution ❤️ commitlint has detected that all commit messages in this PR follow the conventional commit format 🎉 |
Terraform-Check (version: 1.8.5): ✅🖌 Terraform Format: ✅⚙️ Terraform Init: ✅🤖 Terraform Validate: ✅ |
Terraform-Check (version: 1.9.8): ✅🖌 Terraform Format: ✅⚙️ Terraform Init: ✅🤖 Terraform Validate: ✅ |
14c035f to
232902b
Compare
232902b to
fea13a2
Compare
fea13a2 to
73fc367
Compare
|
Thank you very much. This would be a breaking change. I have to test it and add instructions, how to migrate, if we will merge it. |
73fc367 to
50f052f
Compare
|
I tried your change and unfortunately it seems to cause another problem: When you want to add another node to the cluster, the provider tries to recreate and reassign all networks. At first glance, this looks worse than the drifts and temporary removal of the alias IP on apply. Unfortunately, I was also unable to reproduce your bug. |
This PR aims to fix the issue with alias IPs being cleared out on reapplication.
The approach suggested in #257, i.e.
ignore_changes = [network.alias_ips]will unfortunately not work, sincenetworkis a set, so we won't be able to targetalias_ipsthat way.This PR attempts to solve this issue by switching from the inline network definition to using the
hcloud_server_networkresource and then ignoring the alias IP changes on that resource instead.Caveats
Applying this change on an already provisioned cluster will likely cause issues like this:
This likely happens because the plan expects the alias IPs to be empty, but Talos assigns VIP after the network attaches, leading to a mismatch between the plan and the outcome of the operation. I tried omitting
alias_ips, but that did not work – the provider defaults to an empty list anyway.I managed to overcome this hurdle by using
terraform untaint– I suspect Terraform marked the resource as tainted when it noticed the inconsistency.This is a non-issue when provisioning a new cluster.