-
Notifications
You must be signed in to change notification settings - Fork 214
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
Cannot delete old cluster template revision #397
Comments
@caiconkhicon , Have you tested it or just assuming it?? ;) You can remove old template revisions with the provider, but the feature was limited by the reason you mentiond, it's a list. Anyway, PR #395 includes a fix to address this issue. |
Hi @rawmind0, yes, sure, it has happened to me many times. The part about "because revisions is treated as a list" is just my assumption/understanding, but others are facts from the output of Terraform. |
@rawmind0 : I tested. The deletion works. However, now I face another weird error with creation. If I add a new revision AFTER the current revision, everything is fine. However, if I add the new revision BEFORE the current revision, when "terraform apply", beside from adding the new revision, Terraform shows that many parameters of the current revision need to be changed:
Because of that, the apply fails. |
@caiconkhicon , add the new revision BEFORE the current revision seems a new request and not required, due to you can add always at the end of the list. Anyway, PR has been updated and it should work now. |
PR is merged to master. Please, reopen issue if needed. |
@rawmind0 : Thanks for your fix. It works now. |
With the current implementation of Rancher, when I want to use a new cluster template revision and decommission the old one, I must do 3 steps:
The 1st and 2nd steps can be done by both Rancher UI and with Terraform. However, the 3nd cannot be done with Terraform, because revisions is treated as a list, so when I add a new revision, the list is [revision-1,revision-2]. Then I remove the first one, it is [revision-2]. Thus, if I apply, Terraform understands that I want to remove the second entry, while update the first one. This action will fail for sure, because revision-2 is in-used (because of the 2nd step above).
Please implement a way to make this procedure possible, because it is a very common activity.
Thanks a lot.
The text was updated successfully, but these errors were encountered: