Skip to content

Commit fa8766e

Browse files
Improve deprecation warning for Record.Value (#1015)
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.
1 parent 2ffb29c commit fa8766e

File tree

8 files changed

+48
-38
lines changed

8 files changed

+48
-38
lines changed

provider/cmd/pulumi-resource-cloudflare/schema.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24425,7 +24425,7 @@
2442524425
"value": {
2442624426
"type": "string",
2442724427
"description": "The value of the record. Must provide only one of `data`, `content`, `value`.\n",
24428-
"deprecationMessage": "`value` is deprecated in favour of `content` and will be removed in the next major release."
24428+
"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`."
2442924429
},
2443024430
"zoneId": {
2443124431
"type": "string",
@@ -24493,7 +24493,7 @@
2449324493
"value": {
2449424494
"type": "string",
2449524495
"description": "The value of the record. Must provide only one of `data`, `content`, `value`.\n",
24496-
"deprecationMessage": "`value` is deprecated in favour of `content` and will be removed in the next major release."
24496+
"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`."
2449724497
},
2449824498
"zoneId": {
2449924499
"type": "string",
@@ -24579,7 +24579,7 @@
2457924579
"value": {
2458024580
"type": "string",
2458124581
"description": "The value of the record. Must provide only one of `data`, `content`, `value`.\n",
24582-
"deprecationMessage": "`value` is deprecated in favour of `content` and will be removed in the next major release."
24582+
"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`."
2458324583
},
2458424584
"zoneId": {
2458524585
"type": "string",

provider/resources.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,17 @@ func Provider() info.Provider {
136136
// If `type` or `zoneId` is changed, then the resource will replace but the new
137137
// resource will conflict with the old one. To avoid this, we set
138138
// `DeleteBeforeReplace: true`.
139-
"cloudflare_record": {DeleteBeforeReplace: true},
139+
"cloudflare_record": {
140+
DeleteBeforeReplace: true,
141+
Fields: map[string]*info.Schema{
142+
"value": {
143+
DeprecationMessage: "`value` is deprecated in favour of `content` " +
144+
"and will be removed in the next major release. " +
145+
"Due to reports of inconsistent behavior on the `value` field, " +
146+
"we strongly recommend migrating to `content`.",
147+
},
148+
},
149+
},
140150

141151
"cloudflare_risk_behavior": {ComputeID: delegateID("accountId")},
142152
"cloudflare_zero_trust_access_mtls_hostname_settings": {ComputeID: delegateID("accountId")},

sdk/go/cloudflare/record.go

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/java/src/main/java/com/pulumi/cloudflare/Record.java

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/java/src/main/java/com/pulumi/cloudflare/RecordArgs.java

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/java/src/main/java/com/pulumi/cloudflare/inputs/RecordState.java

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/nodejs/record.ts

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)