Skip to content

Commit

Permalink
Improve deprecation warning for Record.Value (#1015)
Browse files Browse the repository at this point in the history
In partial assist for
#952.

Due to not having a reliable repro of #952, we update the deprecation
warning on Record.Value to be more explicit about updating to the new
field.

This pull request is blocked on the next bridge release as it needs
changes from
pulumi/pulumi-terraform-bridge#2746.
  • Loading branch information
guineveresaenger authored Jan 6, 2025
1 parent 2ffb29c commit fa8766e
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 38 deletions.
6 changes: 3 additions & 3 deletions provider/cmd/pulumi-resource-cloudflare/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -24425,7 +24425,7 @@
"value": {
"type": "string",
"description": "The value of the record. Must provide only one of `data`, `content`, `value`.\n",
"deprecationMessage": "`value` is deprecated in favour of `content` and will be removed in the next major release."
"deprecationMessage": "`value` is deprecated in favour of `content` and will be removed in the next major release. Due to reports of inconsistent behavior on the `value` field, we strongly recommend migrating to `content`."
},
"zoneId": {
"type": "string",
Expand Down Expand Up @@ -24493,7 +24493,7 @@
"value": {
"type": "string",
"description": "The value of the record. Must provide only one of `data`, `content`, `value`.\n",
"deprecationMessage": "`value` is deprecated in favour of `content` and will be removed in the next major release."
"deprecationMessage": "`value` is deprecated in favour of `content` and will be removed in the next major release. Due to reports of inconsistent behavior on the `value` field, we strongly recommend migrating to `content`."
},
"zoneId": {
"type": "string",
Expand Down Expand Up @@ -24579,7 +24579,7 @@
"value": {
"type": "string",
"description": "The value of the record. Must provide only one of `data`, `content`, `value`.\n",
"deprecationMessage": "`value` is deprecated in favour of `content` and will be removed in the next major release."
"deprecationMessage": "`value` is deprecated in favour of `content` and will be removed in the next major release. Due to reports of inconsistent behavior on the `value` field, we strongly recommend migrating to `content`."
},
"zoneId": {
"type": "string",
Expand Down
12 changes: 11 additions & 1 deletion provider/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,17 @@ func Provider() info.Provider {
// If `type` or `zoneId` is changed, then the resource will replace but the new
// resource will conflict with the old one. To avoid this, we set
// `DeleteBeforeReplace: true`.
"cloudflare_record": {DeleteBeforeReplace: true},
"cloudflare_record": {
DeleteBeforeReplace: true,
Fields: map[string]*info.Schema{
"value": {
DeprecationMessage: "`value` is deprecated in favour of `content` " +
"and will be removed in the next major release. " +
"Due to reports of inconsistent behavior on the `value` field, " +
"we strongly recommend migrating to `content`.",
},
},
},

"cloudflare_risk_behavior": {ComputeID: delegateID("accountId")},
"cloudflare_zero_trust_access_mtls_hostname_settings": {ComputeID: delegateID("accountId")},
Expand Down
12 changes: 6 additions & 6 deletions sdk/go/cloudflare/record.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sdk/java/src/main/java/com/pulumi/cloudflare/Record.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions sdk/java/src/main/java/com/pulumi/cloudflare/RecordArgs.java

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions sdk/nodejs/record.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fa8766e

Please sign in to comment.