Skip to content

Commit 10b09ca

Browse files
committed
s3: fix blocked_encryption_types appearing in plan when empty
Only set blocked_encryption_types in state when there are actual values to prevent empty lists from appearing in the plan unexpectedly.
1 parent 029cc22 commit 10b09ca

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/service/s3/bucket_server_side_encryption_configuration.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,9 @@ func flattenServerSideEncryptionRules(rules []types.ServerSideEncryptionRule) []
327327
}
328328

329329
if rule.BlockedEncryptionTypes != nil {
330-
m["blocked_encryption_types"] = flattenBlockedEncryptionTypes(rule.BlockedEncryptionTypes)
330+
if flattened := flattenBlockedEncryptionTypes(rule.BlockedEncryptionTypes); flattened != nil {
331+
m["blocked_encryption_types"] = flattened
332+
}
331333
}
332334

333335
if rule.BucketKeyEnabled != nil {

0 commit comments

Comments
 (0)