From d24e0b8cfa37818e4642e0b8c307f205636b6741 Mon Sep 17 00:00:00 2001 From: sreallymatt <106555974+sreallymatt@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:44:28 -0700 Subject: [PATCH 1/3] Update guide-breaking-changes.md --- contributing/topics/guide-breaking-changes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contributing/topics/guide-breaking-changes.md b/contributing/topics/guide-breaking-changes.md index f6e815282f79..1880b0c0cffb 100644 --- a/contributing/topics/guide-breaking-changes.md +++ b/contributing/topics/guide-breaking-changes.md @@ -241,7 +241,7 @@ The following example follows a fictional resource that will have the following ### `azurerm_example_resource` - * The deprecated `scaling_enabled` property has been removed in favour of the `scaling_enabled` property. + * The deprecated `enable_scaling` property has been removed in favour of the `scaling_enabled` property. * The property `version` now defaults to `2`. ``` @@ -354,7 +354,7 @@ func (r SparkResource) Arguments() map[string]*pluginsdk.Schema{ }, false), }, } - } + if !features.FivePointOhBeta() { args["spark_version"].Default = "2.4" } From d5db7ef8c2652813459b95153ba718c472d9c3b2 Mon Sep 17 00:00:00 2001 From: sreallymatt <106555974+sreallymatt@users.noreply.github.com> Date: Mon, 9 Dec 2024 12:20:49 -0700 Subject: [PATCH 2/3] Fix whitespace in code snippet --- contributing/topics/guide-breaking-changes.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contributing/topics/guide-breaking-changes.md b/contributing/topics/guide-breaking-changes.md index 1880b0c0cffb..679cba6b3774 100644 --- a/contributing/topics/guide-breaking-changes.md +++ b/contributing/topics/guide-breaking-changes.md @@ -340,7 +340,7 @@ This is a breaking change as Terraform should not trigger a plan between minor v ```go func (r SparkResource) Arguments() map[string]*pluginsdk.Schema{ - args := map[string]*pluginsdk.Schema{ + args := map[string]*pluginsdk.Schema{ "spark_version": { Type: pluginsdk.TypeString, Optional: true, @@ -353,13 +353,13 @@ func (r SparkResource) Arguments() map[string]*pluginsdk.Schema{ "3.4", }, false), }, - } + } - if !features.FivePointOhBeta() { - args["spark_version"].Default = "2.4" + if !features.FivePointOhBeta() { + args["spark_version"].Default = "2.4" } - return args + return args } ``` From b8a82d2f19b3e2012b399bd19b7255cae5c97ee7 Mon Sep 17 00:00:00 2001 From: sreallymatt <106555974+sreallymatt@users.noreply.github.com> Date: Tue, 10 Dec 2024 07:34:29 -0700 Subject: [PATCH 3/3] Address comments --- contributing/topics/guide-breaking-changes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contributing/topics/guide-breaking-changes.md b/contributing/topics/guide-breaking-changes.md index 679cba6b3774..4283860b12e1 100644 --- a/contributing/topics/guide-breaking-changes.md +++ b/contributing/topics/guide-breaking-changes.md @@ -166,7 +166,7 @@ The following example follows a fictional resource that will have the following }, } - if !features.FivePointOhBeta { + if !features.FivePointOhBeta() { args["enable_scaling"] = &pluginsdk.Schema{ Type: pluginsdk.TypeBool, Optional: true, @@ -336,7 +336,7 @@ Terraform will perform the following actions: Plan: 0 to add, 1 to change, 0 to destroy. ``` -This is a breaking change as Terraform should not trigger a plan between minor version upgrades. Instead, what we can do is add a TODO next to the `Default` tag to update the default value in the next major version of the provider or mark the field as Required if that default value is going to continue to change in the future: +This is a breaking change as Terraform should not trigger a plan between minor version upgrades. Instead, what we can do is use the major release feature flag as shown in the example below or mark the field as Required if that default value is going to continue to change in the future: ```go func (r SparkResource) Arguments() map[string]*pluginsdk.Schema{