Skip to content

Commit

Permalink
Fix redrive_allow_policy JSON diff in upstream provider
Browse files Browse the repository at this point in the history
  • Loading branch information
csssuf committed Nov 11, 2024
1 parent 7a7a576 commit 380ade9
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions patches/0077-Fix-spurious-JSON-diff-for-redrive_allow_policy.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: James Forcier <[email protected]>
Date: Mon, 11 Nov 2024 16:12:57 -0500
Subject: [PATCH] Fix spurious JSON diff for redrive_allow_policy

This applies the same fix found in #2529 to the RedriveAllowPolicy
resource, which needs the same treatment.

diff --git a/internal/service/sqs/queue_redrive_allow_policy.go b/internal/service/sqs/queue_redrive_allow_policy.go
index 7e3c390e50..789bb04619 100644
--- a/internal/service/sqs/queue_redrive_allow_policy.go
+++ b/internal/service/sqs/queue_redrive_allow_policy.go
@@ -32,9 +32,10 @@ func resourceQueueRedriveAllowPolicy() *schema.Resource {
ForceNew: true,
},
"redrive_allow_policy": {
- Type: schema.TypeString,
- Required: true,
- ValidateFunc: validation.StringIsJSON,
+ Type: schema.TypeString,
+ Required: true,
+ ValidateFunc: validation.StringIsJSON,
+ DiffSuppressFunc: verify.SuppressEquivalentJSONDiffs,
StateFunc: func(v interface{}) string {
json, _ := structure.NormalizeJsonString(v)
return json

0 comments on commit 380ade9

Please sign in to comment.