Skip to content

Commit

Permalink
Merge pull request #280 from pulumi/upgrade-terraform-provider-aiven-…
Browse files Browse the repository at this point in the history
…to-v4.2.1

Upgrade terraform-provider-aiven to v4.2.1
  • Loading branch information
guineveresaenger authored Apr 20, 2023
2 parents 48bf0ec + 8a62f98 commit 4dbd7e6
Show file tree
Hide file tree
Showing 184 changed files with 4,634 additions and 754 deletions.
19 changes: 9 additions & 10 deletions patches/0002-Avoid-panic-in-custom_diff.patch
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)

Loading

0 comments on commit 4dbd7e6

Please sign in to comment.