Skip to content

Add wait to existing resource #222

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

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

willthames
Copy link
Contributor

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

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

@pst pst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good to add the test. But I am not sure if I understand the issue here. 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. How does that make a difference for the test?

@willthames
Copy link
Contributor Author

willthames commented Feb 15, 2023

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
Copy link
Contributor Author

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
Copy link
Member

pst commented Feb 15, 2023

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

@pst pst merged commit caaf745 into kbst:master Feb 15, 2023
@pst
Copy link
Member

pst commented Feb 15, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants