From 3b4589645b2b6f099b148fd23e5cecfc583cfadb Mon Sep 17 00:00:00 2001 From: lex00 <121451605+lex00@users.noreply.github.com> Date: Sat, 24 Oct 2026 06:30:04 -0600 Subject: [PATCH] fix(sns): TagResource and UntagResource return their Result element (#6411) The AWS SDKs decode both responses through TagResourceResult and UntagResourceResult, so Terraform's aws_sns_topic tag updates now succeed. --- .../floci/services/sns/SnsQueryHandler.java | 4 +-- .../services/sns/SnsIntegrationTest.java | 27 +++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/hectorvent/floci/services/sns/SnsQueryHandler.java b/src/main/java/io/github/hectorvent/floci/services/sns/SnsQueryHandler.java index a42e680356..e9a7842217 100644 --- a/src/main/java/io/github/hectorvent/floci/services/sns/SnsQueryHandler.java +++ b/src/main/java/io/github/hectorvent/floci/services/sns/SnsQueryHandler.java @@ -587,7 +587,7 @@ public class SnsQueryHandler { Map tags = extractSnsTags(params); try { snsService.tagResource(resourceArn, tags, region); - return Response.ok(AwsQueryResponse.envelopeNoResult("TagResource", AwsNamespaces.SNS)).build(); + return Response.ok(AwsQueryResponse.envelopeEmptyResult("TagResource", AwsNamespaces.SNS)).build(); } catch (AwsException e) { return xmlErrorResponse(e); } @@ -603,7 +603,7 @@ public class SnsQueryHandler { } try { snsService.untagResource(resourceArn, tagKeys, region); - return Response.ok(AwsQueryResponse.envelopeNoResult("UntagResource", AwsNamespaces.SNS)).build(); + return Response.ok(AwsQueryResponse.envelopeEmptyResult("UntagResource", AwsNamespaces.SNS)).build(); } catch (AwsException e) { return xmlErrorResponse(e); } diff --git a/src/test/java/io/github/hectorvent/floci/services/sns/SnsIntegrationTest.java b/src/test/java/io/github/hectorvent/floci/services/sns/SnsIntegrationTest.java index c63a13485d..aedda537e4 100644 --- a/src/test/java/io/github/hectorvent/floci/services/sns/SnsIntegrationTest.java +++ b/src/test/java/io/github/hectorvent/floci/services/sns/SnsIntegrationTest.java @@ -354,8 +354,35 @@ class SnsIntegrationTest { .formParam("Tags.member.1.Value", "test") .when() .post("/") + .then() + .statusCode(200) + .body(containsString("