-
Notifications
You must be signed in to change notification settings - Fork 51
/
0005-Modify-resources.patch
2794 lines (2578 loc) · 111 KB
/
0005-Modify-resources.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Anton Tayanovskyy <anton@pulumi.com>
Date: Wed, 7 Feb 2024 13:53:37 -0500
Subject: [PATCH] Modify resources
diff --git a/internal/services/advisor/advisor_recommendations_data_source.go b/internal/services/advisor/advisor_recommendations_data_source.go
index 39c0506972..c4965dfbdb 100644
--- a/internal/services/advisor/advisor_recommendations_data_source.go
+++ b/internal/services/advisor/advisor_recommendations_data_source.go
@@ -8,6 +8,9 @@ import (
"strings"
"time"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress"
+
"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
@@ -38,7 +41,8 @@ func dataSourceAdvisorRecommendations() *pluginsdk.Resource {
string(getrecommendations.CategoryPerformance),
string(getrecommendations.CategoryCost),
string(getrecommendations.CategoryOperationalExcellence),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
},
diff --git a/internal/services/analysisservices/analysis_services_server_resource.go b/internal/services/analysisservices/analysis_services_server_resource.go
index 40c52aa5bd..dab70b9c5c 100644
--- a/internal/services/analysisservices/analysis_services_server_resource.go
+++ b/internal/services/analysisservices/analysis_services_server_resource.go
@@ -6,6 +6,8 @@ package analysisservices
import (
"bytes"
"fmt"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress"
"log"
"strings"
"time"
@@ -120,7 +122,8 @@ func resourceAnalysisServicesServer() *pluginsdk.Resource {
ValidateFunc: validation.StringInSlice([]string{
string(servers.ConnectionModeAll),
string(servers.ConnectionModeReadOnly),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"backup_blob_container_uri": {
diff --git a/internal/services/appservice/helpers/function_app_schema.go b/internal/services/appservice/helpers/function_app_schema.go
index 06b5fa4d90..bdda339536 100644
--- a/internal/services/appservice/helpers/function_app_schema.go
+++ b/internal/services/appservice/helpers/function_app_schema.go
@@ -1059,10 +1059,11 @@ func linuxFunctionAppStackSchema() *pluginsdk.Schema {
Description: "The version of .Net. Possible values are `3.1`, `6.0` and `7.0`",
},
+ // FORK: Removed default value due to pulumi-azure#1227
+ // These modifications can be removed once pulumi-terraform-bridge#577 is fixed.
"use_dotnet_isolated_runtime": {
Type: pluginsdk.TypeBool,
Optional: true,
- Default: false,
ConflictsWith: []string{
"site_config.0.application_stack.0.python_version",
"site_config.0.application_stack.0.java_version",
diff --git a/internal/services/appservice/linux_function_app_slot_resource_test.go b/internal/services/appservice/linux_function_app_slot_resource_test.go
index 4b02552385..5dfdc6a81e 100644
--- a/internal/services/appservice/linux_function_app_slot_resource_test.go
+++ b/internal/services/appservice/linux_function_app_slot_resource_test.go
@@ -1098,11 +1098,21 @@ func TestAccLinuxFunctionAppSlot_identityKeyVaultIdentity(t *testing.T) {
data.ResourceTest(t, r, []acceptance.TestStep{
{
- Config: r.identityUserAssignedKeyVaultIdentity(data, SkuStandardPlan),
+ Config: r.basic(data, SkuStandardPlan),
+ Check: acceptance.ComposeTestCheckFunc(
+ check.That(data.ResourceName).ExistsInAzure(r),
+ check.That(data.ResourceName).Key("kind").HasValue("functionapp,linux"),
+ ),
+ },
+ data.ImportStep(),
+ {
+ Config: r.updateStorageAccount(data, SkuStandardPlan),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
+ check.That(data.ResourceName).Key("kind").HasValue("functionapp,linux"),
),
},
+ data.ImportStep(),
})
}
@@ -1147,7 +1157,6 @@ func TestAccLinuxFunctionAppSlot_storageAccountKeyVaultSecret(t *testing.T) {
Config: r.storageAccountKVSecret(data, SkuStandardPlan),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
- check.That(data.ResourceName).Key("kind").HasValue("functionapp,linux"),
),
},
data.ImportStep("site_credential.0.password"),
diff --git a/internal/services/automation/automation_runbook_resource.go b/internal/services/automation/automation_runbook_resource.go
index fd0873abad..a3c6fb2896 100644
--- a/internal/services/automation/automation_runbook_resource.go
+++ b/internal/services/automation/automation_runbook_resource.go
@@ -8,6 +8,8 @@ import (
"log"
"time"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
+
"github.com/gofrs/uuid"
"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-helpers/lang/response"
@@ -132,7 +134,7 @@ func resourceAutomationRunbook() *pluginsdk.Resource {
string(runbook.RunbookTypeEnumPowerShellWorkflow),
string(runbook.RunbookTypeEnumPowerShellSevenTwo),
string(runbook.RunbookTypeEnumScript),
- }, false),
+ }, features.CaseInsensitive()),
},
"log_progress": {
diff --git a/internal/services/automation/automation_schedule_resource.go b/internal/services/automation/automation_schedule_resource.go
index 111ae21ae1..ed886bf6b7 100644
--- a/internal/services/automation/automation_schedule_resource.go
+++ b/internal/services/automation/automation_schedule_resource.go
@@ -6,6 +6,7 @@ package automation
import (
"context"
"fmt"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
"log"
"strings"
"time"
@@ -74,7 +75,7 @@ func resourceAutomationSchedule() *pluginsdk.Resource {
string(schedule.ScheduleFrequencyMonth),
string(schedule.ScheduleFrequencyOneTime),
string(schedule.ScheduleFrequencyWeek),
- }, false),
+ }, features.CaseInsensitive()),
},
// ignored when frequency is `OneTime`
@@ -127,7 +128,8 @@ func resourceAutomationSchedule() *pluginsdk.Resource {
string(schedule.ScheduleDayFriday),
string(schedule.ScheduleDaySaturday),
string(schedule.ScheduleDaySunday),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
Set: set.HashStringIgnoreCase,
ConflictsWith: []string{"month_days", "monthly_occurrence"},
@@ -164,7 +166,7 @@ func resourceAutomationSchedule() *pluginsdk.Resource {
string(schedule.ScheduleDayFriday),
string(schedule.ScheduleDaySaturday),
string(schedule.ScheduleDaySunday),
- }, false),
+ }, features.CaseInsensitive()),
},
"occurrence": {
Type: pluginsdk.TypeInt,
diff --git a/internal/services/cdn/cdn_endpoint_resource.go b/internal/services/cdn/cdn_endpoint_resource.go
index 81c443076a..862c644a49 100644
--- a/internal/services/cdn/cdn_endpoint_resource.go
+++ b/internal/services/cdn/cdn_endpoint_resource.go
@@ -5,6 +5,8 @@ package cdn
import (
"fmt"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress"
"log"
"time"
@@ -170,7 +172,8 @@ func resourceCdnEndpoint() *pluginsdk.Resource {
ValidateFunc: validation.StringInSlice([]string{
string(cdn.ActionTypeAllow),
string(cdn.ActionTypeBlock),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"country_codes": {
Type: pluginsdk.TypeList,
@@ -192,7 +195,8 @@ func resourceCdnEndpoint() *pluginsdk.Resource {
string(cdn.OptimizationTypeGeneralWebDelivery),
string(cdn.OptimizationTypeLargeFileDownload),
string(cdn.OptimizationTypeVideoOnDemandMediaStreaming),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"fqdn": {
diff --git a/internal/services/cdn/cdn_profile_resource.go b/internal/services/cdn/cdn_profile_resource.go
index 67956f15c9..0b70ccb184 100644
--- a/internal/services/cdn/cdn_profile_resource.go
+++ b/internal/services/cdn/cdn_profile_resource.go
@@ -5,6 +5,8 @@ package cdn
import (
"fmt"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress"
"time"
"github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2020-09-01/cdn" // nolint: staticcheck
@@ -67,7 +69,8 @@ func resourceCdnProfile() *pluginsdk.Resource {
string(cdn.SkuNameStandardVerizon),
string(cdn.SkuNameStandardMicrosoft),
string(cdn.SkuNamePremiumVerizon),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"tags": tags.Schema(),
diff --git a/internal/services/compute/image_resource.go b/internal/services/compute/image_resource.go
index d1de175cb8..d18589669e 100644
--- a/internal/services/compute/image_resource.go
+++ b/internal/services/compute/image_resource.go
@@ -7,6 +7,9 @@ import (
"fmt"
"time"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
+ "github.com/tombuildsstuff/kermit/sdk/compute/2022-08-01/compute"
+
"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
@@ -88,18 +91,18 @@ func resourceImage() *pluginsdk.Resource {
Type: pluginsdk.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{
- string(images.OperatingSystemTypesLinux),
- string(images.OperatingSystemTypesWindows),
- }, false),
+ string(compute.OperatingSystemTypesLinux),
+ string(compute.OperatingSystemTypesWindows),
+ }, features.CaseInsensitive()),
},
"os_state": {
Type: pluginsdk.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{
- string(images.OperatingSystemStateTypesGeneralized),
- string(images.OperatingSystemStateTypesSpecialized),
- }, false),
+ string(compute.OperatingSystemStateTypesGeneralized),
+ string(compute.OperatingSystemStateTypesSpecialized),
+ }, features.CaseInsensitive()),
},
"managed_disk_id": {
@@ -123,10 +126,10 @@ func resourceImage() *pluginsdk.Resource {
Optional: true,
Default: string(images.CachingTypesNone),
ValidateFunc: validation.StringInSlice([]string{
- string(images.CachingTypesNone),
- string(images.CachingTypesReadOnly),
- string(images.CachingTypesReadWrite),
- }, false),
+ string(compute.CachingTypesNone),
+ string(compute.CachingTypesReadOnly),
+ string(compute.CachingTypesReadWrite),
+ }, features.CaseInsensitive()),
},
"size_gb": {
@@ -176,10 +179,11 @@ func resourceImage() *pluginsdk.Resource {
Optional: true,
Default: string(images.CachingTypesNone),
ValidateFunc: validation.StringInSlice([]string{
- string(images.CachingTypesNone),
- string(images.CachingTypesReadOnly),
- string(images.CachingTypesReadWrite),
- }, false),
+ string(compute.CachingTypesNone),
+ string(compute.CachingTypesReadOnly),
+ string(compute.CachingTypesReadWrite),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"size_gb": {
diff --git a/internal/services/compute/linux_virtual_machine_resource.go b/internal/services/compute/linux_virtual_machine_resource.go
index fdeed2c65d..eb99645011 100644
--- a/internal/services/compute/linux_virtual_machine_resource.go
+++ b/internal/services/compute/linux_virtual_machine_resource.go
@@ -368,11 +368,11 @@ func resourceLinuxVirtualMachine() *pluginsdk.Resource {
},
"platform_fault_domain": {
- Type: pluginsdk.TypeInt,
- Optional: true,
- Default: -1,
- ForceNew: true,
- RequiredWith: []string{"virtual_machine_scale_set_id"},
+ Type: pluginsdk.TypeInt,
+ Optional: true,
+ Default: -1,
+ ForceNew: true,
+ //RequiredWith: []string{"virtual_machine_scale_set_id"},
ValidateFunc: validation.IntAtLeast(-1),
},
diff --git a/internal/services/compute/managed_disk_resource.go b/internal/services/compute/managed_disk_resource.go
index 619b11b2a3..2b87497d64 100644
--- a/internal/services/compute/managed_disk_resource.go
+++ b/internal/services/compute/managed_disk_resource.go
@@ -164,6 +164,7 @@ func resourceManagedDisk() *pluginsdk.Resource {
Type: pluginsdk.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{
+
string(disks.OperatingSystemTypesWindows),
string(disks.OperatingSystemTypesLinux),
}, false),
diff --git a/internal/services/compute/snapshot_resource.go b/internal/services/compute/snapshot_resource.go
index 539c138df6..5446846a89 100644
--- a/internal/services/compute/snapshot_resource.go
+++ b/internal/services/compute/snapshot_resource.go
@@ -68,7 +68,7 @@ func resourceSnapshot() *pluginsdk.Resource {
ValidateFunc: validation.StringInSlice([]string{
string(snapshots.DiskCreateOptionCopy),
string(snapshots.DiskCreateOptionImport),
- }, false),
+ }, features.CaseInsensitive()),
},
"incremental_enabled": {
diff --git a/internal/services/compute/virtual_machine_data_disk_attachment_resource.go b/internal/services/compute/virtual_machine_data_disk_attachment_resource.go
index db0a760341..fe30ade2d5 100644
--- a/internal/services/compute/virtual_machine_data_disk_attachment_resource.go
+++ b/internal/services/compute/virtual_machine_data_disk_attachment_resource.go
@@ -5,6 +5,7 @@ package compute
import (
"fmt"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
"log"
"time"
@@ -71,7 +72,8 @@ func resourceVirtualMachineDataDiskAttachment() *pluginsdk.Resource {
string(virtualmachines.CachingTypesNone),
string(virtualmachines.CachingTypesReadOnly),
string(virtualmachines.CachingTypesReadWrite),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"create_option": {
@@ -82,7 +84,8 @@ func resourceVirtualMachineDataDiskAttachment() *pluginsdk.Resource {
ValidateFunc: validation.StringInSlice([]string{
string(virtualmachines.DiskCreateOptionTypesAttach),
string(virtualmachines.DiskCreateOptionTypesEmpty),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"write_accelerator_enabled": {
diff --git a/internal/services/compute/windows_virtual_machine_resource.go b/internal/services/compute/windows_virtual_machine_resource.go
index 4c6030c160..e320bb0c99 100644
--- a/internal/services/compute/windows_virtual_machine_resource.go
+++ b/internal/services/compute/windows_virtual_machine_resource.go
@@ -383,11 +383,11 @@ func resourceWindowsVirtualMachine() *pluginsdk.Resource {
},
"platform_fault_domain": {
- Type: pluginsdk.TypeInt,
- Optional: true,
- Default: -1,
- ForceNew: true,
- RequiredWith: []string{"virtual_machine_scale_set_id"},
+ Type: pluginsdk.TypeInt,
+ Optional: true,
+ Default: -1,
+ ForceNew: true,
+ //RequiredWith: []string{"virtual_machine_scale_set_id"},
ValidateFunc: validation.IntAtLeast(-1),
},
diff --git a/internal/services/containers/container_group_resource.go b/internal/services/containers/container_group_resource.go
index 8c58fcc2df..be6dd18437 100644
--- a/internal/services/containers/container_group_resource.go
+++ b/internal/services/containers/container_group_resource.go
@@ -11,6 +11,8 @@ import (
"strings"
"time"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress"
+
"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
@@ -72,7 +74,8 @@ func resourceContainerGroup() *pluginsdk.Resource {
string(containerinstance.ContainerGroupIPAddressTypePublic),
string(containerinstance.ContainerGroupIPAddressTypePrivate),
"None",
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"os_type": {
@@ -82,7 +85,8 @@ func resourceContainerGroup() *pluginsdk.Resource {
ValidateFunc: validation.StringInSlice([]string{
string(containerinstance.OperatingSystemTypesWindows),
string(containerinstance.OperatingSystemTypesLinux),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"image_registry_credential": {
@@ -168,7 +172,7 @@ func resourceContainerGroup() *pluginsdk.Resource {
string(containerinstance.ContainerGroupRestartPolicyAlways),
string(containerinstance.ContainerGroupRestartPolicyNever),
string(containerinstance.ContainerGroupRestartPolicyOnFailure),
- }, false),
+ }, features.CaseInsensitive()),
},
"dns_name_label": {
diff --git a/internal/services/containers/container_registry_resource.go b/internal/services/containers/container_registry_resource.go
index b4421f2947..0eb8adf83a 100644
--- a/internal/services/containers/container_registry_resource.go
+++ b/internal/services/containers/container_registry_resource.go
@@ -7,7 +7,6 @@ import (
"context"
"fmt"
"log"
- "sort"
"strings"
"time"
@@ -762,11 +761,6 @@ func resourceContainerRegistryRead(d *pluginsdk.ResourceData, meta interface{})
}
}
- // The order of the georeplications returned from the list API is not consistent. We simply order it alphabetically to be consistent.
- sort.Slice(geoReplications, func(i, j int) bool {
- return geoReplications[i].(map[string]interface{})["location"].(string) < geoReplications[j].(map[string]interface{})["location"].(string)
- })
-
d.Set("georeplications", geoReplications)
return nil
diff --git a/internal/services/containers/kubernetes_cluster_resource.go b/internal/services/containers/kubernetes_cluster_resource.go
index e4a6c70f92..3706fdcb8f 100644
--- a/internal/services/containers/kubernetes_cluster_resource.go
+++ b/internal/services/containers/kubernetes_cluster_resource.go
@@ -1060,7 +1060,7 @@ func resourceKubernetesCluster() *pluginsdk.Resource {
ValidateFunc: validation.StringInSlice([]string{
string(managedclusters.LoadBalancerSkuBasic),
string(managedclusters.LoadBalancerSkuStandard),
- }, false),
+ }, features.CaseInsensitive()),
},
"outbound_type": {
diff --git a/internal/services/cosmos/common/schema.go b/internal/services/cosmos/common/schema.go
index b141d14cfd..0e3d2fd1b2 100644
--- a/internal/services/cosmos/common/schema.go
+++ b/internal/services/cosmos/common/schema.go
@@ -107,9 +107,10 @@ func CosmosDbIndexingPolicySchema() *pluginsdk.Schema {
// `automatic` is excluded as it is deprecated; see https://stackoverflow.com/a/58721386
// `indexing_mode` case changes from 2020-04-01 to 2021-01-15 issue https://github.com/Azure/azure-rest-api-specs/issues/14051
"indexing_mode": {
- Type: pluginsdk.TypeString,
- Optional: true,
- Default: documentdb.IndexingModeConsistent,
+ Type: pluginsdk.TypeString,
+ Optional: true,
+ Default: documentdb.IndexingModeConsistent,
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only, // Open issue https://github.com/Azure/azure-sdk-for-go/issues/6603
ValidateFunc: validation.StringInSlice([]string{
string(documentdb.IndexingModeConsistent),
string(documentdb.IndexingModeNone),
diff --git a/internal/services/cosmos/cosmosdb_account_resource.go b/internal/services/cosmos/cosmosdb_account_resource.go
index bdbf31ad05..fb941af76c 100644
--- a/internal/services/cosmos/cosmosdb_account_resource.go
+++ b/internal/services/cosmos/cosmosdb_account_resource.go
@@ -13,6 +13,8 @@ import (
"strings"
"time"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress"
+
"github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2021-10-15/documentdb" // nolint: staticcheck
"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-helpers/lang/response"
@@ -204,7 +206,7 @@ func resourceCosmosDbAccount() *pluginsdk.Resource {
Required: true,
ValidateFunc: validation.StringInSlice([]string{
string(cosmosdb.DatabaseAccountOfferTypeStandard),
- }, false),
+ }, features.CaseInsensitive()),
},
"analytical_storage": {
@@ -291,7 +293,7 @@ func resourceCosmosDbAccount() *pluginsdk.Resource {
string(cosmosdb.DatabaseAccountKindGlobalDocumentDB),
string(cosmosdb.DatabaseAccountKindMongoDB),
string(cosmosdb.DatabaseAccountKindParse),
- }, false),
+ }, features.CaseInsensitive()),
},
"ip_range_filter": func() *schema.Schema {
@@ -387,7 +389,7 @@ func resourceCosmosDbAccount() *pluginsdk.Resource {
string(cosmosdb.DefaultConsistencyLevelEventual),
string(cosmosdb.DefaultConsistencyLevelSession),
string(cosmosdb.DefaultConsistencyLevelStrong),
- }, false),
+ }, features.CaseInsensitive()),
},
// This value can only change if the 'consistency_level' is set to 'BoundedStaleness'
@@ -446,8 +448,9 @@ func resourceCosmosDbAccount() *pluginsdk.Resource {
Elem: &pluginsdk.Resource{
Schema: map[string]*pluginsdk.Schema{
"name": {
- Type: pluginsdk.TypeString,
- Required: true,
+ Type: pluginsdk.TypeString,
+ Required: true,
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
ValidateFunc: validation.StringInSlice([]string{
string(databaseAccountCapabilitiesEnableAggregationPipeline),
string(databaseAccountCapabilitiesEnableCassandra),
diff --git a/internal/services/cosmos/cosmosdb_cassandra_cluster_resource_test.go b/internal/services/cosmos/cosmosdb_cassandra_cluster_resource_test.go
index e6a2b93e01..53efd0fc1f 100644
--- a/internal/services/cosmos/cosmosdb_cassandra_cluster_resource_test.go
+++ b/internal/services/cosmos/cosmosdb_cassandra_cluster_resource_test.go
@@ -18,6 +18,18 @@ import (
type CassandraClusterResource struct{}
+func TestAccCassandraCluster(t *testing.T) {
+ // NOTE: this is a combined test rather than separate split out tests due to all below TCs sharing same sp
+ acceptance.RunTestsInSequence(t, map[string]map[string]func(t *testing.T){
+ "basic": {
+ "basic": testAccCassandraCluster_basic,
+ "requiresImport": testAccCassandraCluster_requiresImport,
+ "complete": testAccCassandraCluster_complete,
+ "update": testAccCassandraCluster_update,
+ },
+ })
+}
+
func testAccCassandraCluster_basic(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_cosmosdb_cassandra_cluster", "test")
r := CassandraClusterResource{}
diff --git a/internal/services/cosmos/cosmosdb_gremlin_graph_resource.go b/internal/services/cosmos/cosmosdb_gremlin_graph_resource.go
index ba13f83bab..6c6e7bd44b 100644
--- a/internal/services/cosmos/cosmosdb_gremlin_graph_resource.go
+++ b/internal/services/cosmos/cosmosdb_gremlin_graph_resource.go
@@ -6,6 +6,7 @@ package cosmos
import (
"context"
"fmt"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress"
"log"
"strings"
"time"
@@ -126,8 +127,9 @@ func resourceCosmosDbGremlinGraph() *pluginsdk.Resource {
// case change in 2021-01-15, issue https://github.com/Azure/azure-rest-api-specs/issues/14051
"indexing_mode": {
- Type: pluginsdk.TypeString,
- Required: true,
+ Type: pluginsdk.TypeString,
+ Required: true,
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only, // Open issue https://github.com/Azure/azure-sdk-for-go/issues/6603
ValidateFunc: validation.StringInSlice([]string{
string(cosmosdb.IndexingModeConsistent),
string(cosmosdb.IndexingModeNone),
diff --git a/internal/services/dns/dns_caa_record_resource.go b/internal/services/dns/dns_caa_record_resource.go
index 24f5734126..ed9096b273 100644
--- a/internal/services/dns/dns_caa_record_resource.go
+++ b/internal/services/dns/dns_caa_record_resource.go
@@ -14,8 +14,10 @@ import (
"github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01/recordsets"
"github.com/hashicorp/terraform-provider-azurerm/helpers/tf"
"github.com/hashicorp/terraform-provider-azurerm/internal/clients"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/dns/migration"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation"
"github.com/hashicorp/terraform-provider-azurerm/internal/timeouts"
)
@@ -82,7 +84,8 @@ func resourceDnsCaaRecord() *pluginsdk.Resource {
"issue",
"issuewild",
"iodef",
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"value": {
diff --git a/internal/services/eventhub/eventhub_namespace_resource.go b/internal/services/eventhub/eventhub_namespace_resource.go
index 4c348213e9..578b65b5ac 100644
--- a/internal/services/eventhub/eventhub_namespace_resource.go
+++ b/internal/services/eventhub/eventhub_namespace_resource.go
@@ -80,7 +80,7 @@ func resourceEventHubNamespace() *pluginsdk.Resource {
string(namespaces.SkuNameBasic),
string(namespaces.SkuNameStandard),
string(namespaces.SkuNamePremium),
- }, false),
+ }, features.CaseInsensitive()),
},
"capacity": {
diff --git a/internal/services/eventhub/eventhub_resource.go b/internal/services/eventhub/eventhub_resource.go
index b3cb1e5f84..7cb1c42d70 100644
--- a/internal/services/eventhub/eventhub_resource.go
+++ b/internal/services/eventhub/eventhub_resource.go
@@ -5,6 +5,7 @@ package eventhub
import (
"fmt"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
"log"
"time"
@@ -93,7 +94,7 @@ func resourceEventHub() *pluginsdk.Resource {
ValidateFunc: validation.StringInSlice([]string{
string(eventhubs.EncodingCaptureDescriptionAvro),
string(eventhubs.EncodingCaptureDescriptionAvroDeflate),
- }, false),
+ }, features.CaseInsensitive()),
},
"interval_in_seconds": {
Type: pluginsdk.TypeInt,
diff --git a/internal/services/firewall/firewall_policy_resource.go b/internal/services/firewall/firewall_policy_resource.go
index 29d42ef784..f2f9d678ab 100644
--- a/internal/services/firewall/firewall_policy_resource.go
+++ b/internal/services/firewall/firewall_policy_resource.go
@@ -8,6 +8,8 @@ import (
"log"
"time"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
+
"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
@@ -790,14 +792,13 @@ func resourceFirewallPolicySchema() map[string]*pluginsdk.Schema {
"protocol": {
Type: pluginsdk.TypeString,
Required: true,
- // protocol to be one of [ICMP ANY TCP UDP] but response may be "Any"
- DiffSuppressFunc: suppress.CaseDifference,
ValidateFunc: validation.StringInSlice([]string{
string(firewallpolicies.FirewallPolicyIntrusionDetectionProtocolICMP),
string(firewallpolicies.FirewallPolicyIntrusionDetectionProtocolANY),
string(firewallpolicies.FirewallPolicyIntrusionDetectionProtocolTCP),
string(firewallpolicies.FirewallPolicyIntrusionDetectionProtocolUDP),
- }, true),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"source_addresses": {
Type: pluginsdk.TypeSet,
diff --git a/internal/services/hdinsight/hdinsight_hadoop_cluster_resource.go b/internal/services/hdinsight/hdinsight_hadoop_cluster_resource.go
index 067484d622..f17abd35c9 100644
--- a/internal/services/hdinsight/hdinsight_hadoop_cluster_resource.go
+++ b/internal/services/hdinsight/hdinsight_hadoop_cluster_resource.go
@@ -5,6 +5,7 @@ package hdinsight
import (
"fmt"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress"
"log"
"strings"
"time"
@@ -147,9 +148,10 @@ func resourceHDInsightHadoopCluster() *pluginsdk.Resource {
},
"vm_size": {
- Type: pluginsdk.TypeString,
- Required: true,
- ValidateFunc: validation.StringInSlice(validate.NodeDefinitionVMSize, false),
+ Type: pluginsdk.TypeString,
+ Required: true,
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
+ ValidateFunc: validation.StringInSlice(validate.NodeDefinitionVMSize, false),
},
"install_script_action": {
diff --git a/internal/services/hdinsight/schema.go b/internal/services/hdinsight/schema.go
index 36c461cbdc..da5c8b4982 100644
--- a/internal/services/hdinsight/schema.go
+++ b/internal/services/hdinsight/schema.go
@@ -5,6 +5,8 @@ package hdinsight
import (
"fmt"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress"
"net/url"
"regexp"
"strings"
@@ -42,7 +44,8 @@ func SchemaHDInsightTier() *pluginsdk.Schema {
ValidateFunc: validation.StringInSlice([]string{
string(clusters.TierStandard),
string(clusters.TierPremium),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
}
}
@@ -1165,10 +1168,11 @@ type HDInsightNodeDefinition struct {
func SchemaHDInsightNodeDefinition(schemaLocation string, definition HDInsightNodeDefinition, required bool) *pluginsdk.Schema {
result := map[string]*pluginsdk.Schema{
"vm_size": {
- Type: pluginsdk.TypeString,
- Required: true,
- ForceNew: true,
- ValidateFunc: validation.StringInSlice(validate.NodeDefinitionVMSize, false),
+ Type: pluginsdk.TypeString,
+ Required: true,
+ ForceNew: true,
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
+ ValidateFunc: validation.StringInSlice(validate.NodeDefinitionVMSize, false),
},
"username": {
Type: pluginsdk.TypeString,
diff --git a/internal/services/iotcentral/iotcentral_application_resource.go b/internal/services/iotcentral/iotcentral_application_resource.go
index e15c10ac79..ebcdb70c0b 100644
--- a/internal/services/iotcentral/iotcentral_application_resource.go
+++ b/internal/services/iotcentral/iotcentral_application_resource.go
@@ -90,7 +90,7 @@ func resourceIotCentralApplication() *pluginsdk.Resource {
string(apps.AppSkuSTOne),
string(apps.AppSkuSTTwo),
string(apps.AppSkuSTZero),
- }, false),
+ }, features.CaseInsensitive()),
Default: string(apps.AppSkuSTOne),
},
"template": {
diff --git a/internal/services/iothub/iothub_resource.go b/internal/services/iothub/iothub_resource.go
index 3d40271135..b2dccadabb 100644
--- a/internal/services/iothub/iothub_resource.go
+++ b/internal/services/iothub/iothub_resource.go
@@ -30,6 +30,7 @@ import (
servicebusValidate "github.com/hashicorp/terraform-provider-azurerm/internal/services/servicebus/validate"
"github.com/hashicorp/terraform-provider-azurerm/internal/tags"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress"
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation"
"github.com/hashicorp/terraform-provider-azurerm/internal/timeouts"
"github.com/hashicorp/terraform-provider-azurerm/utils"
@@ -341,11 +342,13 @@ func resourceIotHub() *pluginsdk.Resource {
},
"encoding": {
- Type: pluginsdk.TypeString,
- Optional: true,
- ForceNew: true,
- Default: string(devices.EncodingAvro),
- DiffSuppressFunc: suppressIfTypeIsNot("AzureIotHub.StorageContainer"),
+ Type: pluginsdk.TypeString,
+ Optional: true,
+ ForceNew: true,
+ Default: string(devices.EncodingAvro),
+ DiffSuppressFunc: suppressWhenAny(
+ suppressIfTypeIsNot("AzureIotHub.StorageContainer"),
+ suppress.CaseDifferenceV2Only),
ValidateFunc: validation.StringInSlice([]string{
string(devices.EncodingAvro),
string(devices.EncodingAvroDeflate),
diff --git a/internal/services/keyvault/key_vault_certificate_resource.go b/internal/services/keyvault/key_vault_certificate_resource.go
index 90e02d8080..8970530193 100644
--- a/internal/services/keyvault/key_vault_certificate_resource.go
+++ b/internal/services/keyvault/key_vault_certificate_resource.go
@@ -9,6 +9,8 @@ import (
"encoding/base64"
"encoding/hex"
"fmt"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress"
"log"
"math"
"strings"
@@ -157,7 +159,8 @@ func resourceKeyVaultCertificate() *pluginsdk.Resource {
string(keyvault.JSONWebKeyTypeRSA),
string(keyvault.JSONWebKeyTypeRSAHSM),
string(keyvault.JSONWebKeyTypeOct),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"reuse_key": {
Type: pluginsdk.TypeBool,
diff --git a/internal/services/legacy/virtual_machine_resource.go b/internal/services/legacy/virtual_machine_resource.go
index 2bc0fb2243..03efb5e451 100644
--- a/internal/services/legacy/virtual_machine_resource.go
+++ b/internal/services/legacy/virtual_machine_resource.go
@@ -13,6 +13,8 @@ import (
"strings"
"time"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
+
"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
@@ -154,7 +156,7 @@ func resourceVirtualMachine() *pluginsdk.Resource {
ValidateFunc: validation.StringInSlice([]string{
"Windows_Client",
"Windows_Server",
- }, false),
+ }, features.CaseInsensitive()),
},
"vm_size": {
@@ -220,7 +222,8 @@ func resourceVirtualMachine() *pluginsdk.Resource {
ValidateFunc: validation.StringInSlice([]string{
string(virtualmachines.OperatingSystemTypesLinux),
string(virtualmachines.OperatingSystemTypesWindows),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"name": {
@@ -255,7 +258,8 @@ func resourceVirtualMachine() *pluginsdk.Resource {
string(virtualmachines.StorageAccountTypesPremiumLRS),
string(virtualmachines.StorageAccountTypesStandardLRS),
string(virtualmachines.StorageAccountTypesStandardSSDLRS),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"image_uri": {
@@ -329,7 +333,8 @@ func resourceVirtualMachine() *pluginsdk.Resource {
string(virtualmachines.StorageAccountTypesStandardLRS),
string(virtualmachines.StorageAccountTypesStandardSSDLRS),
string(virtualmachines.StorageAccountTypesUltraSSDLRS),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"create_option": {
@@ -476,7 +481,8 @@ func resourceVirtualMachine() *pluginsdk.Resource {
ValidateFunc: validation.StringInSlice([]string{
"HTTP",
"HTTPS",
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"certificate_url": {
Type: pluginsdk.TypeString,
diff --git a/internal/services/legacy/virtual_machine_scale_set_resource.go b/internal/services/legacy/virtual_machine_scale_set_resource.go
index 799f142449..6aada8c4d7 100644
--- a/internal/services/legacy/virtual_machine_scale_set_resource.go
+++ b/internal/services/legacy/virtual_machine_scale_set_resource.go
@@ -12,6 +12,8 @@ import (
"strings"
"time"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
+
"github.com/hashicorp/go-azure-helpers/lang/pointer"
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema"
@@ -123,7 +125,7 @@ func resourceVirtualMachineScaleSet() *pluginsdk.Resource {
ValidateFunc: validation.StringInSlice([]string{
"Windows_Client",
"Windows_Server",
- }, false),
+ }, features.CaseInsensitive()),
},
"upgrade_policy_mode": {
@@ -133,7 +135,8 @@ func resourceVirtualMachineScaleSet() *pluginsdk.Resource {
string(virtualmachinescalesets.UpgradeModeAutomatic),
string(virtualmachinescalesets.UpgradeModeManual),
string(virtualmachinescalesets.UpgradeModeRolling),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"health_probe_id": {
@@ -206,7 +209,8 @@ func resourceVirtualMachineScaleSet() *pluginsdk.Resource {
ValidateFunc: validation.StringInSlice([]string{
string(virtualmachinescalesets.VirtualMachinePriorityTypesLow),
string(virtualmachinescalesets.VirtualMachinePriorityTypesRegular),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"eviction_policy": {
@@ -572,7 +576,8 @@ func resourceVirtualMachineScaleSet() *pluginsdk.Resource {
string(virtualmachinescalesets.StorageAccountTypesPremiumLRS),
string(virtualmachinescalesets.StorageAccountTypesStandardLRS),
string(virtualmachinescalesets.StorageAccountTypesStandardSSDLRS),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"caching": {
@@ -631,7 +636,8 @@ func resourceVirtualMachineScaleSet() *pluginsdk.Resource {
string(virtualmachinescalesets.StorageAccountTypesPremiumLRS),
string(virtualmachinescalesets.StorageAccountTypesStandardLRS),
string(virtualmachinescalesets.StorageAccountTypesStandardSSDLRS),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
},
},
diff --git a/internal/services/loadbalancer/loadbalancer_resource.go b/internal/services/loadbalancer/loadbalancer_resource.go
index 88ad72fb9d..f9c43c1458 100644
--- a/internal/services/loadbalancer/loadbalancer_resource.go
+++ b/internal/services/loadbalancer/loadbalancer_resource.go
@@ -6,6 +6,7 @@ package loadbalancer
import (
"context"
"fmt"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
"log"
"reflect"
"strconv"
@@ -399,7 +400,8 @@ func resourceArmLoadBalancerSchema() map[string]*pluginsdk.Schema {
string(loadbalancers.LoadBalancerSkuNameBasic),
string(loadbalancers.LoadBalancerSkuNameStandard),
string(loadbalancers.LoadBalancerSkuNameGateway),
- }, false),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
"sku_tier": {
diff --git a/internal/services/loadbalancer/nat_pool_resource.go b/internal/services/loadbalancer/nat_pool_resource.go
index d07fec653a..2c55900279 100644
--- a/internal/services/loadbalancer/nat_pool_resource.go
+++ b/internal/services/loadbalancer/nat_pool_resource.go
@@ -5,6 +5,7 @@ package loadbalancer
import (
"fmt"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
"log"
"time"
@@ -71,7 +72,7 @@ func resourceArmLoadBalancerNatPool() *pluginsdk.Resource {
string(loadbalancers.TransportProtocolAll),
string(loadbalancers.TransportProtocolTcp),
string(loadbalancers.TransportProtocolUdp),
- }, false),
+ }, features.CaseInsensitive()),
},
"frontend_port_start": {
diff --git a/internal/services/loadbalancer/nat_rule_resource.go b/internal/services/loadbalancer/nat_rule_resource.go
index 773f12d0c5..a3b8822324 100644
--- a/internal/services/loadbalancer/nat_rule_resource.go
+++ b/internal/services/loadbalancer/nat_rule_resource.go
@@ -5,6 +5,7 @@ package loadbalancer
import (
"fmt"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
"log"
"time"
@@ -69,7 +70,7 @@ func resourceArmLoadBalancerNatRule() *pluginsdk.Resource {
string(loadbalancers.TransportProtocolAll),
string(loadbalancers.TransportProtocolTcp),
string(loadbalancers.TransportProtocolUdp),
- }, false),
+ }, features.CaseInsensitive()),
},
"frontend_port": {
diff --git a/internal/services/loadbalancer/probe_resource.go b/internal/services/loadbalancer/probe_resource.go
index 5b4376f28d..ea4551f9ab 100644
--- a/internal/services/loadbalancer/probe_resource.go