banzaicloud/terraform-provider-k8s

Resource updating is broken on latest master

sagikazarmark opened this issue · 0 comments

Describe the bug
Updating a resource always ends up in an error: Failed to unmarshal manifest: EOF

Steps to reproduce the issue:

  1. Create any k8s_manifest resource
  2. Try to change and update it

Expected behavior
Update should complete without errors

Additional context

I believe #79 introduced two serious breaking changes that led to this bug:

  • A new override_content argument was introduced to track the original content, but it's only set when ignore_fields is also provided
  • Similarly, new and original content values are not populated properly, unless ignore_fields is also provided

Looking at the PR override_content also seems to be redundant and unnecessary since ignored fields can be computed without storing it.