Files
floci/src/main/java/io
Priamo Germosen 671628b525 feat(cloudtrail): implement AddTags, RemoveTags and ListTags (#2934)
* feat(cloudtrail): implement AddTags, RemoveTags and ListTags

CloudTrailJsonHandler dispatched none of the three tag actions, so any
trail lookup went through the unsupported-action path — including the
Terraform AWS provider's transparent-tagging ListTags call on every read
of aws_cloudtrail, which broke refresh/plan/destroy for any state
containing a trail regardless of whether it was tagged.

Tags are tracked per-trail in CloudTrailEntry (not the wire-serialized
Trail record, which AWS never includes tags on) and are resolved by ARN
only, matching AWS's actual request shape for these three actions. An
ARN that isn't a well-formed CloudTrail trail ARN raises
CloudTrailARNInvalidException; a well-formed ARN with no matching trail
raises ResourceNotFoundException, so a stale Terraform state entry
surfaces as a real error instead of an empty tag list.

Fixes floci-io/floci#2297

* fix(cloudtrail): omit Value from ListTags response for valueless tags

AddTags only requires Key, so a tag can legitimately have no Value.
listTags() was serializing that as an explicit "Value":null, but AWS
omits absent optionals from the response entirely.
2026-09-02 17:29:03 -05:00
..