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

helper/schema: Clarify Deprecated Field Usage #1012

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

helper/schema: Clarify Deprecated Field Usage #1012

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

Comments

@bflad
Copy link
Contributor

bflad commented Jul 27, 2022

SDK version

2.19.0

Use-cases

Currently, the helper/schema.Schema type Deprecated field is a message that gets translated into a warning diagnostic during Terraform's validation phase:

Warning: Argument is deprecated

{Deprecated field string}

This handling however, due to limitations in the protocol, only occurs for Required or Optional attributes when they have a known configuration value. There is currently no effect when the attribute is Computed-only (read-only). The SDK 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 Deprecated and only Computed via schema.InternalValidate(), 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 v2.20.0 milestone Jul 27, 2022
@bflad bflad self-assigned this Jul 27, 2022
bflad added a commit that referenced this issue 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
Development

Successfully merging a pull request may close this issue.

1 participant