Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Resource Plan Modification Example for Warnings on Destroy #430

Closed
bflad opened this issue Jul 28, 2022 · 1 comment · Fixed by #431
Closed

Add Resource Plan Modification Example for Warnings on Destroy #430

bflad opened this issue Jul 28, 2022 · 1 comment · Fixed by #431
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@bflad
Copy link
Member

bflad commented Jul 28, 2022

Module version

v0.10.0

Use-cases

terraform-plugin-framework 0.10.0+ and Terraform 1.3+ support the ability for provider developers to return warning and/or error diagnostics when a resource is planned for destruction. The initial website documentation mentions the feature, but doesn't provide a quick code example. It'd be great to provide that.

Attempted Solutions

Figuring it out through trial and error or looking at other provider code.

Proposal

Add a quick subsection to https://www.terraform.io/plugin/framework/resources/plan-modification#resource-plan-modification that's specifically "Resource Destroy Plan Diagnostics" and something that shows req.Plan.IsNull() with resp.Diagnostics.AddWarning().

References

@bflad bflad added the documentation Improvements or additions to documentation label Jul 28, 2022
@bflad bflad added this to the v0.11.0 milestone Jul 28, 2022
@bflad bflad self-assigned this Jul 28, 2022
bflad added a commit that referenced this issue Jul 28, 2022
@bflad bflad closed this as completed in #431 Aug 1, 2022
@github-actions
Copy link

github-actions bot commented Sep 1, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant