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

tfsdk: Clarify DeprecationMessage Field Usage #428

Closed
bflad opened this issue Jul 27, 2022 · 1 comment · Fixed by #429
Closed

tfsdk: Clarify DeprecationMessage Field Usage #428

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

Comments

@bflad
Copy link
Contributor

bflad commented Jul 27, 2022

Module version

0.10.0

Use-cases

Currently, the tfsdk.Attribute type DeprecationMessage field is a message that gets translated into a warning diagnostic during Terraform's validation phase:

Warning: Attribute Deprecated

{DeprecationMessage field string}

This handling however, due to limitations in the protocol, only occurs for Required or Optional attributes when they have a configuration value (known or unknown in the case of the framework). There is currently no effect when the attribute is Computed-only (read-only). The framework already enables the deprecated boolean field available in the protocol, so if/when Terraform core does something with that protocol field in a future version, it'll have an effect on read-only attributes then.

Proposal

Update the Go documentation and website documentation to ensure it denotes this limitation. We could go further and begin failing unit testing for attributes with DeprecationMessage and only Computed via #113, however that feature can be treated separately, if desired.

References

@bflad bflad added the documentation Improvements or additions to documentation label Jul 27, 2022
@bflad bflad added this to the v0.11.0 milestone Jul 27, 2022
@bflad bflad self-assigned this Jul 27, 2022
@github-actions
Copy link

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 Aug 28, 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
1 participant