hashicorp / hashicorp/terraform-plugin-sdk
Proposal: Add variant of `CustomizeDiffFunc` that returns `diag.Diagnostics`
Open
enhancement
terraform-plugin-framework
- Dominant language
- Go
- Stars
- 485
- Forks
- 244
- Avg merge
- 19h 57m
- Merged PRs (30d)
- 4
Description
### Use-cases
There are times when a `CustomizeDiffFunc` would ideally return a warning message. The current option is to add a log message, but that is only visible to the practitioner if logging is enabled.
### Proposal
Create a variant of `CustomizeDiffFunc`, e.g., `CustomizeDiffFuncDiags`, that returns a `diag.Diagnostics` instead of `error`.
Contributor guide
Research direction
Start by locating CustomizeDiffFunc and the existing diag.Diagnostics type in the SDK. Trace how CustomizeDiffFunc results are handled, then define done as supporting a diagnostics-returning variant that can expose warning messages to practitioners.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, terraform
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100