vultr / terraform-provider-vultr

Terraform Vultr provider
https://www.terraform.io/docs/providers/vultr/
Mozilla Public License 2.0
191 stars 65 forks source link

[Feature] - vultr_kubernetes should support refreshing version changes #311

Closed jtackaberry closed 1 year ago

jtackaberry commented 1 year ago

If one creates a VKE cluster via Terraform but subsequently uses the console to manage VKE cluster upgrades (which one might prefer to do as AFAICT there is no way to leverage VKE's upgrade orchestration via Terraform), this will cause tf state to diverge.

terraform refresh should detect the cluster version change and update state accordingly. Currently this can only be done through direct state manipulation.

optik-aper commented 1 year ago

344 will allow updating the state via terraform refresh, but it's inadvisable to modify resources outside of terraform. With the added upgrade functionality, you ought to be able to specify a new k8s version for the VKE cluster in the terraform config. The caveat is that, if you upgrade the cluster outside of terraform now, it will throw an error:

image