Skip to content

Comments

read deprecation message for resource deprecations#38135

Open
DanielMSchmidt wants to merge 4 commits intomainfrom
add-deprecation-message
Open

read deprecation message for resource deprecations#38135
DanielMSchmidt wants to merge 4 commits intomainfrom
add-deprecation-message

Conversation

@DanielMSchmidt
Copy link
Contributor

@DanielMSchmidt DanielMSchmidt commented Feb 9, 2026

Fixes #

Target Release

1.15.x

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

CHANGELOG entry

  • This change is user-facing and I added a changelog entry.
  • This change is not user-facing.

@DanielMSchmidt DanielMSchmidt requested a review from a team as a code owner February 9, 2026 13:20
Copy link
Member

@dbanck dbanck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also include the new deprecation message in the provider schema JSON so that other consumers, such as language servers, can display it. This should be relatively easy to do by updating:

type Attribute struct {
AttributeType json.RawMessage `json:"type,omitempty"`
AttributeNestedType *NestedType `json:"nested_type,omitempty"`
Description string `json:"description,omitempty"`
DescriptionKind string `json:"description_kind,omitempty"`
Deprecated bool `json:"deprecated,omitempty"`
Required bool `json:"required,omitempty"`
Optional bool `json:"optional,omitempty"`
Computed bool `json:"computed,omitempty"`
Sensitive bool `json:"sensitive,omitempty"`
WriteOnly bool `json:"write_only,omitempty"`
}

@DanielMSchmidt DanielMSchmidt force-pushed the add-deprecation-message branch from c8a05ab to 1a39809 Compare February 19, 2026 10:20
@ansgarm
Copy link
Member

ansgarm commented Feb 19, 2026

I think we should also include the new deprecation message in the provider schema JSON

I agree – the only remark I'd have before we do that, would be to check this with large providers like AWS / Azure / Google. As they might have lots of these and this might cause their schema size to explode even further. I would at least like to test this locally to see how much that schema increases in size to get some rough percentage.

@DanielMSchmidt
Copy link
Contributor Author

@dbanck & @ansgarm good thinking! I'll make a separate PR for that and include some testing with AWS, Azure and Google 👍

@ewbankkit
Copy link
Contributor

For the Terraform AWS Provider:

For Terraform Plugin SDKv2:

% grep 'Deprecated: ' internal/service/*/*.go | wc -l
      72

For Terraform Plugin Framework:

% grep DeprecationMessage internal/service/*/*.go | wc -l
      23

so, less than 100 deprecation messages so far and each message is usually less than 100 characters (often something like status is deprecated. Use state instead.). A tiny fraction of the overall provider schema JSON size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants