Skip to content

Commit

Permalink
Add debug message for cluster unreachable at plan time (#962)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jrhouston authored Sep 29, 2022
1 parent 4022218 commit 5155c90
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions helm/resource_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5155c90

Please sign in to comment.