banzaicloud/terraform-provider-k8s

Cannot update resources because of `invalid: metadata.resourceVersion`

mcfedr opened this issue · 5 comments

Describe the bug
Trying to update a resource i get this error logged, and the resource is not updated

Error: certificates.cert-manager.io "test-cert" is invalid: metadata.resourceVersion: Invalid value: 0x0: must be specified for an update

Also - the terraform state is being updated, so next time i run plan terraform says nothing to do.

Steps to reproduce the issue:

  • create the resource
  • change the yaml
  • update the resource

Seeing quite a few people with issues related to this, e.g. kubernetes/kubernetes#70674 - seems to be that the request to update should contain the current value of resourceVersion

  • also looks like it might not be the case for all resource types

As you can see in my error, I'm specifically having this issue with CRD type certificates.cert-manager.io - when i have a chance ill see if it reproduces with something builtin

HI, @mcfedr

just submitted #25 to hopefully resolve this.

Released the fix in v0.7.2

:) that was a fast turn around! thanks.