kbst / terraform-provider-kustomization

Terraform provider for Kustomize
https://www.kubestack.com
Apache License 2.0
267 stars 53 forks source link

Add wait to existing resource #222

Closed willthames closed 1 year ago

willthames commented 1 year ago

Ensure that adding wait to an existing resource works (previously this failed because it didn't notice that the resource had changed)

willthames commented 1 year ago

I wrote the test such that it fails without this change and succeeds with it.

Currently kustomizationResourceUpdate is called because terraform knows there's a change to the resource. However, before this change, kustomizationResourceUpdate would error with "No change" because it was only checking if manifest had changed, because it hadn't been updated to check if wait had changed.

Now kustomizationResourceUpdate doesn't error, and just carries on and changes the resource to add wait

willthames commented 1 year ago

So the only code change is adding the check to have the provider error if the update is called, but there is no diff for wait

It's actually the opposite - the code change is so that the provider doesn't error when wait is different but manifest is unchanged.

pst commented 1 year ago

Got it, thanks. I'll look into releasing this today if possible.

pst commented 1 year ago

https://github.com/kbst/terraform-provider-kustomization/releases/tag/v0.9.2