From cd7da5a92f82b9f2dd58cf24b27618202c410cb2 Mon Sep 17 00:00:00 2001 From: catriona-m <86247157+catriona-m@users.noreply.github.com> Date: Thu, 13 Jan 2022 15:02:57 +0000 Subject: [PATCH] `azurerm_iothub_dps` - updating default `allocation_weight` (#14943) * update default of allocation_weight to match azure default * add 3.0 docs todo comment --- internal/services/iothub/iothub_dps_resource.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/internal/services/iothub/iothub_dps_resource.go b/internal/services/iothub/iothub_dps_resource.go index daaab9c62173..6fb4c6dfe35d 100644 --- a/internal/services/iothub/iothub_dps_resource.go +++ b/internal/services/iothub/iothub_dps_resource.go @@ -108,10 +108,16 @@ func resourceIotHubDPS() *pluginsdk.Resource { Optional: true, Default: features.ThreePointOh(), }, + // TODO update docs with new default for 3.0 "allocation_weight": { - Type: pluginsdk.TypeInt, - Optional: true, - Default: 0, + Type: pluginsdk.TypeInt, + Optional: true, + Default: func() interface{} { + if features.ThreePointOh() { + return 1 + } + return 0 + }(), ValidateFunc: validation.IntBetween(0, 1000), }, "hostname": {