alekc / terraform-provider-kubectl

Mozilla Public License 2.0
160 stars 9 forks source link

When removing fields from the yaml body, they are not removed from the applied manifest #174

Open svanharmelen opened 6 days ago

svanharmelen commented 6 days ago

When using the kubectl_manifest resource it only seems to update existing fields or add new fields to a deployed/applied manifest, but when you remove a field, the field is not removed from the manifest.

Is that by design or am I doing something wrong? I tried using server side applies but that didn't seem to make any differences.

alekc commented 5 days ago

Can you provide an example?

On Tue, 24 Sept 2024, 11:04 Sander van Harmelen, @.***> wrote:

When using the kubectl_manifest resource it only seems to update existing fields or add new fields to a deployed/applied manifest, but when you remove a field, the field is not removed from the manifest.

Is that by design or am I doing something wrong? I tried using server side applies but that didn't seem to make any differences.

— Reply to this email directly, view it on GitHub https://github.com/alekc/terraform-provider-kubectl/issues/174, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACJ5VZGV4JRPLCSSTUFYPDZYE2MNAVCNFSM6AAAAABOX5URTGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU2DIOJVGAZTSMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

svanharmelen commented 5 days ago

I think so, will see if I can create a simple test case that I can share...

svanharmelen commented 3 days ago

Didn't forget this one, but need to find some time. Maybe I can make some time this weekend. Will update when I have something you can test with...