-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #280 from pulumi/upgrade-terraform-provider-aiven-…
…to-v4.2.1 Upgrade terraform-provider-aiven to v4.2.1
- Loading branch information
Showing
184 changed files
with
4,634 additions
and
754 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
From 6d9aa380c452d0481a0683c9e747a77775816c5a Mon Sep 17 00:00:00 2001 | ||
From 992a4677dad6873ce8b65206d04ef0d485350fc5 Mon Sep 17 00:00:00 2001 | ||
From: Anton Tayanovskyy <[email protected]> | ||
Date: Wed, 22 Mar 2023 16:02:19 -0400 | ||
Date: Thu, 20 Apr 2023 16:24:38 -0400 | ||
Subject: [PATCH] Avoid panic in custom_diff | ||
|
||
--- | ||
internal/schemautil/custom_diff.go | 5 +++++ | ||
1 file changed, 5 insertions(+) | ||
internal/schemautil/custom_diff.go | 4 ++++ | ||
1 file changed, 4 insertions(+) | ||
|
||
diff --git a/internal/schemautil/custom_diff.go b/internal/schemautil/custom_diff.go | ||
index 3d6bf64..a57f299 100644 | ||
index 5019feb..ed27976 100644 | ||
--- a/internal/schemautil/custom_diff.go | ||
+++ b/internal/schemautil/custom_diff.go | ||
@@ -220,6 +220,11 @@ func typedKeys(m map[string]cty.Value) map[string]struct{} { | ||
@@ -168,6 +168,10 @@ func CustomizeDiffCheckStaticIPDisassociation(_ context.Context, d *schema.Resou | ||
// CustomizeDiffDisallowMultipleManyToOneKeys checks that we don't have multiple keys that are going to be converted to | ||
// a single key in the API request, e.g. 'ip_filter' and 'ip_filter_object' in the same diff. | ||
func CustomizeDiffDisallowMultipleManyToOneKeys(_ context.Context, d *schema.ResourceDiff, _ interface{}) error { | ||
+ // Avoid panic in d.GetRawConfig().AsValueMap() | ||
+ if d.GetRawConfig().IsNull() { | ||
+ return nil | ||
+ } | ||
+ | ||
ks := d.GetRawConfig().AsValueMap() | ||
|
||
tks := map[string]struct{}{} | ||
for k, v := range d.GetRawConfig().AsValueMap() { | ||
if strings.Contains(k, "_user_config") { // we only care about *_user_config | ||
if err := checkForMultipleValues(v); err != nil { | ||
-- | ||
2.37.1 (Apple Git-137.1) | ||
|
Oops, something went wrong.