Skip to content

Commit 64cf3bf

Browse files
committed
docs: clarify usage of removedInNextMajorVersion tag in resource deprecation guidelines
1 parent 823fcdf commit 64cf3bf

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

contributing/topics/guide-new-fields-to-resource.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ func myResourceRead() {
229229
```
230230
231231
Here is an example for a typed resource:
232+
232233
```go
233234
func (r ExampleResource) Create() sdk.ResourceFunc {
234235
...
@@ -252,7 +253,9 @@ func (r ExampleResource) Read() sdk.ResourceFunc {
252253
}
253254
```
254255
255-
When deprecating a property in a Typed Resource, it is important to ensure that the Go struct representing the schema is correctly tagged to prevent the SDK decoding the removed property when the major version beta / feature flag is in use. In these cases the struct tags must be updated to include `,removedInNextMajorVersion`.
256+
When deprecating a property in a Typed Resource, it is important to ensure that the Go struct representing the schema is correctly tagged to prevent the SDK decoding the removed property when the major version beta / feature flag is in use. In these cases the struct tags must be updated to include `removedInNextMajorVersion`.
257+
258+
Here is an example for using the `removedInNextMajorVersion` tag:
256259
257260
```go
258261
type ExampleResourceModel struct {

0 commit comments

Comments
 (0)