Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade terraform-provider-azurerm to v3.113.0 #2275

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Subject: [PATCH] Update provider version in deprecation notices
We want to include the deprecation notices, but need them to match our version number which is not the same at the upstream version number.

diff --git a/website/docs/r/app_service.html.markdown b/website/docs/r/app_service.html.markdown
index 25e53059a0..e22526a383 100644
index 29e8bbd40f..14336e59d1 100644
--- a/website/docs/r/app_service.html.markdown
+++ b/website/docs/r/app_service.html.markdown
@@ -11,7 +11,7 @@ description: |-
Expand Down Expand Up @@ -58,7 +58,7 @@ index 42c3fd2783..a0c2593b2e 100644
## Example Usage (Dedicated)

diff --git a/website/docs/r/app_service_slot.html.markdown b/website/docs/r/app_service_slot.html.markdown
index 4d2a801464..cbda06e6a6 100644
index 8074da920a..5a60509251 100644
--- a/website/docs/r/app_service_slot.html.markdown
+++ b/website/docs/r/app_service_slot.html.markdown
@@ -11,7 +11,7 @@ description: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Subject: [PATCH] Make storage account resource_group_name optional in data
Look up resource_group_name by using `storageClient.FindAccount` as storage account names should be unique, and resolve back to the resource group it belongs to.

diff --git a/internal/services/storage/storage_account_data_source.go b/internal/services/storage/storage_account_data_source.go
index b215edff58..4381151544 100644
index 482972243e..f49dc817f7 100644
--- a/internal/services/storage/storage_account_data_source.go
+++ b/internal/services/storage/storage_account_data_source.go
@@ -37,7 +37,8 @@ func dataSourceStorageAccount() *pluginsdk.Resource {
@@ -38,7 +38,8 @@ func dataSourceStorageAccount() *pluginsdk.Resource {
ValidateFunc: validate.StorageAccountName,
},

Expand All @@ -20,12 +20,11 @@ index b215edff58..4381151544 100644

"location": commonschema.LocationComputed(),

@@ -534,11 +535,28 @@ func dataSourceStorageAccount() *pluginsdk.Resource {
}
@@ -541,10 +542,27 @@ func dataSourceStorageAccount() *pluginsdk.Resource {

func dataSourceStorageAccountRead(d *pluginsdk.ResourceData, meta interface{}) error {
client := meta.(*clients.Client).Storage.ResourceManager.StorageAccounts
+ storageClient := meta.(*clients.Client).Storage
client := meta.(*clients.Client).Storage.AccountsClient
subscriptionId := meta.(*clients.Client).Account.SubscriptionId
ctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d)
defer cancel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ Try to make diffs as robust and mergable as possible:
- Put added import lines in own block to avoid conflicts.

diff --git a/internal/features/four_point_oh.go b/internal/features/four_point_oh.go
index d3723a3480..4953bff3b7 100644
index 1921cf3887..cb10ba1bbe 100644
--- a/internal/features/four_point_oh.go
+++ b/internal/features/four_point_oh.go
@@ -40,3 +40,9 @@ func FourPointOh() bool {
@@ -47,3 +47,9 @@ func FourPointOh() bool {
func FourPointOhBeta() bool {
return FourPointOh() || false
return FourPointOh() || strings.EqualFold(os.Getenv("ARM_FOURPOINTZERO_BETA"), "true")
}
+
+// FORK: Small function to help us not make a breaking change in the Pulumi
Expand Down Expand Up @@ -323,7 +323,7 @@ index 5d1d4cfe1c..72cb85465c 100644

"dns_name_label": {
diff --git a/internal/services/containers/kubernetes_cluster_resource.go b/internal/services/containers/kubernetes_cluster_resource.go
index a6ecd0eab3..fd859b3158 100644
index ab367080f4..cd100fdc4c 100644
--- a/internal/services/containers/kubernetes_cluster_resource.go
+++ b/internal/services/containers/kubernetes_cluster_resource.go
@@ -1087,7 +1087,7 @@ func resourceKubernetesCluster() *pluginsdk.Resource {
Expand Down Expand Up @@ -441,7 +441,7 @@ index 24f5734126..f20b2cd035 100644

"value": {
diff --git a/internal/services/eventhub/eventhub_namespace_resource.go b/internal/services/eventhub/eventhub_namespace_resource.go
index c4c5093737..74ddb07a33 100644
index da4956270e..f6ff2056d1 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 {
Expand Down Expand Up @@ -815,19 +815,10 @@ index 5b4376f28d..440c5c209a 100644

"port": {
diff --git a/internal/services/loadbalancer/rule_resource.go b/internal/services/loadbalancer/rule_resource.go
index 1ae1e82215..1699fba1b7 100644
index 856e2dea39..d69cf17717 100644
--- a/internal/services/loadbalancer/rule_resource.go
+++ b/internal/services/loadbalancer/rule_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-sdk/resource-manager/network/2023-09-01/loadbalancers"
@@ -371,7 +373,7 @@ func resourceArmLoadBalancerRuleSchema() map[string]*pluginsdk.Schema {
@@ -372,7 +372,7 @@ func resourceArmLoadBalancerRuleSchema() map[string]*pluginsdk.Schema {
string(loadbalancers.TransportProtocolAll),
string(loadbalancers.TransportProtocolTcp),
string(loadbalancers.TransportProtocolUdp),
Expand Down Expand Up @@ -1868,7 +1859,7 @@ index 80b56994a3..b8954de4ac 100644
},
},
diff --git a/internal/services/servicebus/servicebus_namespace_resource.go b/internal/services/servicebus/servicebus_namespace_resource.go
index 3447f732a9..7a01563b25 100644
index 8405a07c91..2d9ca4d9a8 100644
--- a/internal/services/servicebus/servicebus_namespace_resource.go
+++ b/internal/services/servicebus/servicebus_namespace_resource.go
@@ -87,7 +87,8 @@ func resourceServiceBusNamespace() *pluginsdk.Resource {
Expand Down Expand Up @@ -2068,42 +2059,47 @@ index 16797800a2..6d74e94b4f 100644

"storage_account_access_key": {
diff --git a/internal/services/storage/storage_account_resource.go b/internal/services/storage/storage_account_resource.go
index 8e4d3eae4a..351df0b49a 100644
index 04dbb3fd34..f94262e32e 100644
--- a/internal/services/storage/storage_account_resource.go
+++ b/internal/services/storage/storage_account_resource.go
@@ -13,6 +13,9 @@ import (
@@ -11,6 +11,8 @@ import (
"strings"
"time"

+ "github.com/hashicorp/terraform-provider-azurerm/internal/features"
+ "github.com/hashicorp/terraform-provider-azurerm/internal/tf/suppress"
+
"github.com/Azure/azure-sdk-for-go/services/storage/mgmt/2021-09-01/storage" // nolint: staticcheck
azautorest "github.com/Azure/go-autorest/autorest"
"github.com/hashicorp/go-azure-helpers/lang/pointer"
@@ -150,8 +153,9 @@ func resourceStorageAccount() *pluginsdk.Resource {
string(storage.KindBlockBlobStorage),
string(storage.KindFileStorage),
string(storage.KindStorageV2),
- }, false),
- Default: string(storage.KindStorageV2),
+ }, features.CaseInsensitive()),
"github.com/hashicorp/go-azure-helpers/lang/response"
"github.com/hashicorp/go-azure-helpers/resourcemanager/commonids"
@@ -103,17 +105,19 @@ func resourceStorageAccount() *pluginsdk.Resource {
"location": commonschema.Location(),

"account_kind": {
- Type: pluginsdk.TypeString,
- Optional: true,
- ValidateFunc: validation.StringInSlice(storageaccounts.PossibleValuesForKind(), false),
- Default: string(storageaccounts.KindStorageVTwo),
+ Type: pluginsdk.TypeString,
+ Optional: true,
+ ValidateFunc: validation.StringInSlice(storageaccounts.PossibleValuesForKind(), features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
+ Default: string(storage.KindStorageV2),
+ Default: string(storageaccounts.KindStorageVTwo),
},

"account_tier": {
@@ -161,7 +165,8 @@ func resourceStorageAccount() *pluginsdk.Resource {
ValidateFunc: validation.StringInSlice([]string{
string(storage.SkuTierStandard),
string(storage.SkuTierPremium),
- }, false),
+ }, features.CaseInsensitive()),
- Type: pluginsdk.TypeString,
- Required: true,
- ForceNew: true,
- ValidateFunc: validation.StringInSlice(storageaccounts.PossibleValuesForSkuTier(), false),
+ Type: pluginsdk.TypeString,
+ Required: true,
+ ForceNew: true,
+ ValidateFunc: validation.StringInSlice(storageaccounts.PossibleValuesForSkuTier(), features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},

"account_replication_type": {
@@ -174,7 +179,8 @@ func resourceStorageAccount() *pluginsdk.Resource {
@@ -126,15 +130,20 @@ func resourceStorageAccount() *pluginsdk.Resource {
"RAGRS",
"GZRS",
"RAGZRS",
Expand All @@ -2113,22 +2109,30 @@ index 8e4d3eae4a..351df0b49a 100644
},

// Only valid for FileStorage, BlobStorage & StorageV2 accounts, defaults to "Hot" in create function
@@ -185,7 +191,8 @@ func resourceStorageAccount() *pluginsdk.Resource {
ValidateFunc: validation.StringInSlice([]string{
string(storage.AccessTierCool),
string(storage.AccessTierHot),
- }, false),
"access_tier": {
- Type: pluginsdk.TypeString,
- Optional: true,
- Computed: true,
- ValidateFunc: validation.StringInSlice(storageaccounts.PossibleValuesForAccessTier(), false), // TODO: docs for `Premium`
+ Type: pluginsdk.TypeString,
+ Optional: true,
+ Computed: true,
+ ValidateFunc: validation.StringInSlice([]string{
+ string(storageaccounts.AccessTierCool),
+ string(storageaccounts.AccessTierHot),
+ }, features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},

"azure_files_authentication": {
@@ -422,7 +429,8 @@ func resourceStorageAccount() *pluginsdk.Resource {
string(storage.BypassLogging),
string(storage.BypassMetrics),
string(storage.BypassNone),
- }, false),
+ }, features.CaseInsensitive()),
@@ -358,8 +367,9 @@ func resourceStorageAccount() *pluginsdk.Resource {
Optional: true,
Computed: true,
Elem: &pluginsdk.Schema{
- Type: pluginsdk.TypeString,
- ValidateFunc: validation.StringInSlice(storageaccounts.PossibleValuesForBypass(), false),
+ Type: pluginsdk.TypeString,
+ ValidateFunc: validation.StringInSlice(storageaccounts.PossibleValuesForBypass(), features.CaseInsensitive()),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
Set: pluginsdk.HashString,
Expand Down Expand Up @@ -2213,7 +2217,7 @@ index a76a72520f..3d400d4fc0 100644

"max_return": {
diff --git a/internal/services/web/app_service.go b/internal/services/web/app_service.go
index f5dac4de88..c60cc1d850 100644
index 9a965e035a..01b69c1c1f 100644
--- a/internal/services/web/app_service.go
+++ b/internal/services/web/app_service.go
@@ -8,6 +8,9 @@ import (
Expand Down Expand Up @@ -2256,9 +2260,9 @@ index f5dac4de88..c60cc1d850 100644
},

"php_version": {
@@ -354,6 +360,7 @@ func schemaAppServiceSiteConfig() *pluginsdk.Schema {
"VS2017",
@@ -355,6 +361,7 @@ func schemaAppServiceSiteConfig() *pluginsdk.Schema {
"VS2019",
"VS2022",
}, false),
+ DiffSuppressFunc: suppress.CaseDifferenceV2Only,
},
Expand Down
4 changes: 2 additions & 2 deletions patches/0014-Update-documentation.patch
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ index 95dac2d863..22f89d3199 100644
}
```
diff --git a/website/docs/r/app_service.html.markdown b/website/docs/r/app_service.html.markdown
index e22526a383..feff83d72e 100644
index 14336e59d1..af730081cd 100644
--- a/website/docs/r/app_service.html.markdown
+++ b/website/docs/r/app_service.html.markdown
@@ -17,7 +17,7 @@ Manages an App Service (within an App Service Plan).
Expand Down Expand Up @@ -603,7 +603,7 @@ index 53e3926433..cfbf80a9a4 100644
```hcl
data "azuread_service_principal" "MicrosoftWebApp" {
diff --git a/website/docs/r/app_service_slot.html.markdown b/website/docs/r/app_service_slot.html.markdown
index cbda06e6a6..54c68c9c9c 100644
index 5a60509251..410fbbc966 100644
--- a/website/docs/r/app_service_slot.html.markdown
+++ b/website/docs/r/app_service_slot.html.markdown
@@ -235,7 +235,7 @@ A `site_config` block supports the following:
Expand Down
Loading
Loading