From 06701a3ac186a58d458fc82498391942bda6a01c Mon Sep 17 00:00:00 2001 From: John Houston Date: Wed, 28 Sep 2022 11:45:51 -0400 Subject: [PATCH] Add debug message for cluster unreachable at plan time The CustomizeDiffFunc function doesn't allow us to surface diagnostic messages when something goes wrong, only errors. We don't want the plan to fail so instead we mark "manifest" as computed and swallow the error, and write a debug log. --- helm/resource_release.go | 1 + 1 file changed, 1 insertion(+) diff --git a/helm/resource_release.go b/helm/resource_release.go index 48885197a8..d5d7946c34 100644 --- a/helm/resource_release.go +++ b/helm/resource_release.go @@ -862,6 +862,7 @@ func resourceDiff(ctx context.Context, d *schema.ResourceDiff, meta interface{}) // NOTE it would be nice to return a diagnostic here to warn the user // that we can't generate the diff here because the cluster is not yet // reachable but this is not supported by CustomizeDiffFunc + debug(`cluster was unreachable at create time, marking "manifest" as computed`) return d.SetNewComputed("manifest") } return err