Skip to content

Commit ad80225

Browse files
authored
data.azurerm_logic_app_standard - clean up schema and 5.0 upgrade guide (#31501)
1 parent 803c569 commit ad80225

2 files changed

Lines changed: 30 additions & 114 deletions

File tree

internal/services/logic/logic_app_standard_data_source.go

Lines changed: 25 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package logic
66
import (
77
"fmt"
88
"log"
9-
"math"
109
"strings"
1110
"time"
1211

@@ -23,7 +22,6 @@ import (
2322
"github.com/hashicorp/terraform-provider-azurerm/internal/services/appservice/helpers"
2423
"github.com/hashicorp/terraform-provider-azurerm/internal/services/logic/validate"
2524
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
26-
"github.com/hashicorp/terraform-provider-azurerm/internal/tf/validation"
2725
"github.com/hashicorp/terraform-provider-azurerm/internal/timeouts"
2826
)
2927

@@ -521,117 +519,73 @@ func schemaLogicAppStandardSiteConfigDataSource() *pluginsdk.Schema {
521519

522520
"linux_fx_version": {
523521
Type: pluginsdk.TypeString,
524-
Optional: true,
525522
Computed: true,
526523
},
527524

528525
"min_tls_version": {
529526
Type: pluginsdk.TypeString,
530-
Optional: true,
531527
Computed: true,
532-
ValidateFunc: validation.StringInSlice([]string{
533-
string(webapps.SupportedTlsVersionsOnePointTwo),
534-
}, false),
535528
},
536529

537530
"pre_warmed_instance_count": {
538-
Type: pluginsdk.TypeInt,
539-
Optional: true,
540-
Computed: true,
541-
ValidateFunc: validation.IntBetween(0, 20),
531+
Type: pluginsdk.TypeInt,
532+
Computed: true,
542533
},
543534

544535
"scm_ip_restriction": schemaLogicAppStandardIpRestrictionDataSource(),
545536

546537
"scm_use_main_ip_restriction": {
547538
Type: pluginsdk.TypeBool,
548-
Optional: true,
549-
Default: false,
539+
Computed: true,
550540
},
551541

552542
"scm_min_tls_version": {
553543
Type: pluginsdk.TypeString,
554-
Optional: true,
555544
Computed: true,
556-
ValidateFunc: validation.StringInSlice([]string{
557-
string(webapps.SupportedTlsVersionsOnePointTwo),
558-
}, false),
559545
},
560546

561547
"scm_type": {
562548
Type: pluginsdk.TypeString,
563-
Optional: true,
564549
Computed: true,
565-
ValidateFunc: validation.StringInSlice([]string{
566-
string(webapps.ScmTypeBitbucketGit),
567-
string(webapps.ScmTypeBitbucketHg),
568-
string(webapps.ScmTypeCodePlexGit),
569-
string(webapps.ScmTypeCodePlexHg),
570-
string(webapps.ScmTypeDropbox),
571-
string(webapps.ScmTypeExternalGit),
572-
string(webapps.ScmTypeExternalHg),
573-
string(webapps.ScmTypeGitHub),
574-
string(webapps.ScmTypeLocalGit),
575-
string(webapps.ScmTypeNone),
576-
string(webapps.ScmTypeOneDrive),
577-
string(webapps.ScmTypeTfs),
578-
string(webapps.ScmTypeVSO),
579-
string(webapps.ScmTypeVSTSRM),
580-
}, false),
581550
},
582551

583552
"use_32_bit_worker_process": {
584553
Type: pluginsdk.TypeBool,
585-
Optional: true,
586-
Default: true,
554+
Computed: true,
587555
},
588556

589557
"websockets_enabled": {
590558
Type: pluginsdk.TypeBool,
591-
Optional: true,
592-
Default: false,
559+
Computed: true,
593560
},
594561

595562
"health_check_path": {
596563
Type: pluginsdk.TypeString,
597-
Optional: true,
564+
Computed: true,
598565
},
599566

600567
"elastic_instance_minimum": {
601-
Type: pluginsdk.TypeInt,
602-
Optional: true,
603-
Computed: true,
604-
ValidateFunc: validation.IntBetween(0, 20),
568+
Type: pluginsdk.TypeInt,
569+
Computed: true,
605570
},
606571

607572
"app_scale_limit": {
608-
Type: pluginsdk.TypeInt,
609-
Optional: true,
610-
Computed: true,
611-
ValidateFunc: validation.IntAtLeast(0),
573+
Type: pluginsdk.TypeInt,
574+
Computed: true,
612575
},
613576

614577
"runtime_scale_monitoring_enabled": {
615578
Type: pluginsdk.TypeBool,
616-
Optional: true,
617-
Default: false,
579+
Computed: true,
618580
},
619581

620582
"dotnet_framework_version": {
621583
Type: pluginsdk.TypeString,
622-
Optional: true,
623-
Default: "v4.0",
624-
ValidateFunc: validation.StringInSlice([]string{
625-
"v4.0",
626-
"v5.0",
627-
"v6.0",
628-
"v8.0",
629-
}, false),
584+
Computed: true,
630585
},
631586

632587
"vnet_route_all_enabled": {
633588
Type: pluginsdk.TypeBool,
634-
Optional: true,
635589
Computed: true,
636590
},
637591

@@ -646,29 +600,16 @@ func schemaLogicAppStandardSiteConfigDataSource() *pluginsdk.Schema {
646600
if !features.FivePointOh() {
647601
schema.Elem.(*pluginsdk.Resource).Schema["public_network_access_enabled"] = &pluginsdk.Schema{
648602
Type: pluginsdk.TypeBool,
649-
Optional: true,
650603
Computed: true,
651604
Deprecated: "the `site_config.public_network_access_enabled` property has been superseded by the `public_network_access` property and will be removed in v5.0 of the AzureRM Provider.",
652605
}
653606
schema.Elem.(*pluginsdk.Resource).Schema["scm_min_tls_version"] = &pluginsdk.Schema{
654607
Type: pluginsdk.TypeString,
655-
Optional: true,
656608
Computed: true,
657-
ValidateFunc: validation.StringInSlice([]string{
658-
string(webapps.SupportedTlsVersionsOnePointZero),
659-
string(webapps.SupportedTlsVersionsOnePointOne),
660-
string(webapps.SupportedTlsVersionsOnePointTwo),
661-
}, false),
662609
}
663610
schema.Elem.(*pluginsdk.Resource).Schema["min_tls_version"] = &pluginsdk.Schema{
664611
Type: pluginsdk.TypeString,
665-
Optional: true,
666612
Computed: true,
667-
ValidateFunc: validation.StringInSlice([]string{
668-
string(webapps.SupportedTlsVersionsOnePointZero),
669-
string(webapps.SupportedTlsVersionsOnePointOne),
670-
string(webapps.SupportedTlsVersionsOnePointTwo),
671-
}, false),
672613
}
673614
}
674615

@@ -717,43 +658,30 @@ func schemaLogicAppStandardIpRestrictionDataSource() *pluginsdk.Schema {
717658
},
718659

719660
"name": {
720-
Type: pluginsdk.TypeString,
721-
Optional: true,
722-
Computed: true,
723-
ValidateFunc: validation.StringIsNotEmpty,
661+
Type: pluginsdk.TypeString,
662+
Computed: true,
724663
},
725664

726665
"priority": {
727-
Type: pluginsdk.TypeInt,
728-
Optional: true,
729-
Default: 65000,
730-
ValidateFunc: validation.IntBetween(1, math.MaxInt32),
666+
Type: pluginsdk.TypeInt,
667+
Computed: true,
731668
},
732669

733670
"action": {
734671
Type: pluginsdk.TypeString,
735-
Default: "Allow",
736-
Optional: true,
737-
ValidateFunc: validation.StringInSlice([]string{
738-
"Allow",
739-
"Deny",
740-
}, false),
672+
Computed: true,
741673
},
742674

743675
// lintignore:XS003
744676
"headers": {
745-
Type: pluginsdk.TypeList,
746-
Optional: true,
747-
Computed: true,
748-
MaxItems: 1,
749-
ConfigMode: pluginsdk.SchemaConfigModeAttr,
677+
Type: pluginsdk.TypeList,
678+
Computed: true,
750679
Elem: &pluginsdk.Resource{
751680
Schema: map[string]*pluginsdk.Schema{
752681
// lintignore:S018
753682
"x_forwarded_host": {
754683
Type: pluginsdk.TypeSet,
755-
Optional: true,
756-
MaxItems: 8,
684+
Computed: true,
757685
Elem: &pluginsdk.Schema{
758686
Type: pluginsdk.TypeString,
759687
},
@@ -762,35 +690,27 @@ func schemaLogicAppStandardIpRestrictionDataSource() *pluginsdk.Schema {
762690
// lintignore:S018
763691
"x_forwarded_for": {
764692
Type: pluginsdk.TypeSet,
765-
Optional: true,
766-
MaxItems: 8,
693+
Computed: true,
767694
Elem: &pluginsdk.Schema{
768-
Type: pluginsdk.TypeString,
769-
ValidateFunc: validation.IsCIDR,
695+
Type: pluginsdk.TypeString,
770696
},
771697
},
772698

773699
// lintignore:S018
774700
"x_azure_fdid": {
775701
Type: pluginsdk.TypeSet,
776-
Optional: true,
777-
MaxItems: 8,
702+
Computed: true,
778703
Elem: &pluginsdk.Schema{
779-
Type: pluginsdk.TypeString,
780-
ValidateFunc: validation.IsUUID,
704+
Type: pluginsdk.TypeString,
781705
},
782706
},
783707

784708
// lintignore:S018
785709
"x_fd_health_probe": {
786710
Type: pluginsdk.TypeSet,
787-
Optional: true,
788-
MaxItems: 1,
711+
Computed: true,
789712
Elem: &pluginsdk.Schema{
790713
Type: pluginsdk.TypeString,
791-
ValidateFunc: validation.StringInSlice([]string{
792-
"1",
793-
}, false),
794714
},
795715
},
796716
},

website/docs/5.0-upgrade-guide.html.markdown

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,6 @@ This deprecated data source has been superseded/retired and has been removed fro
149149

150150
* This deprecated data source has been retired and has been removed from the Azure Provider.
151151

152-
### `azurerm_logic_app_standard`
153-
154-
* The deprecated `site_config.public_network_access_enabled` property has been removed and superseded by the `public_network_access` property.
155-
* The `client_certificate_mode` property now defaults to `Required` to match API default value.
156-
157152
### `azurerm_postgresql_server`
158153

159154
* This deprecated data source has been retired and has been removed from the Azure Provider.
@@ -351,6 +346,7 @@ Please follow the format in the example below for listing breaking changes in re
351346
### `azurerm_logic_app_standard`
352347

353348
* The deprecated `site_config.public_network_access_enabled` property has been removed and superseded by the `public_network_access` property.
349+
* The `client_certificate_mode` property now defaults to `Required` to match API default value.
354350
* The `site_config.min_tls_version` property no longer accepts `1.0` or `1.1` as a value.
355351
* The `site_config.scm_min_tls_version` property no longer accepts `1.0` or `1.1` as a value.
356352

@@ -537,6 +533,10 @@ Please follow the format in the example below for listing breaking changes in da
537533
* The deprecated `source_arm_resource_id` property has been removed in favour of the `source_resource_id` property.
538534
* The deprecated `metric_arm_resource_id` property has been removed in favour of the `metric_resource_id` property.
539535

536+
### `azurerm_key_vault`
537+
538+
* The deprecated `enable_rbac_authorization` property has been removed in favour of the `rbac_authorization_enabled` property.
539+
540540
### `azurerm_lb_outbound_rule`
541541

542542
* The deprecated `enable_tcp_reset` property has been removed in favour of the `tcp_reset_enabled` property.
@@ -546,10 +546,6 @@ Please follow the format in the example below for listing breaking changes in da
546546
* The deprecated `enable_floating_ip` property has been removed in favour of the `floating_ip_enabled` property.
547547
* The deprecated `enable_tcp_reset` property has been removed in favour of the `tcp_reset_enabled` property.
548548

549-
### `azurerm_key_vault`
550-
551-
* The deprecated `enable_rbac_authorization` property has been removed in favour of the `rbac_authorization_enabled` property.
552-
553549
### `azurerm_logic_app_standard`
554550

555551
* The deprecated `site_config.public_network_access_enabled` property has been removed and superseded by the `public_network_access` property.

0 commit comments

Comments
 (0)