Skip to content

DynamoDB: emulate resource tagging APIs (TagResource, UntagResource, ListTagsOfResource) + CreateTable Tags #298

Closed

Description

@scttfrdmn

Summary

The DynamoDB plugin emulates table CRUD and items well, but does not implement the resource-tagging control-plane APIs:

  • TagResource
  • UntagResource
  • ListTagsOfResource

It also appears to ignore the Tags field on CreateTable (no way to read them back, since ListTagsOfResource is absent).

Why it matters

Tools that tag their own tables to distinguish "tool-managed" vs "externally-managed" resources can't be fully tested against substrate. Concretely, in lagotto we tag CLI-auto-created tables lagotto:managed=cli and only auto-delete tables carrying that tag (so we never delete CloudFormation-managed tables). The "is this table managed by us?" check calls DescribeTable → ListTagsOfResource, which substrate doesn't emulate, so that code path can't be exercised in unit tests — we currently fall back to a conservative "treat as unmanaged" and assert only that it doesn't delete.

Observed

grep of dynamodb_plugin.go shows handled ops include CreateTable/DeleteTable/DescribeTable/UpdateTimeToLive/DescribeTimeToLive/Scan/Query/PutItem/etc., but no TagResource/UntagResource/ListTagsOfResource case, and CreateTable.Tags isn't stored.

Requested

  1. Store Tags passed to CreateTable.
  2. Implement TagResource / UntagResource (mutate the stored tag set).
  3. Implement ListTagsOfResource (return the stored tags for a table ARN).

This would let tag-based ownership logic be tested end-to-end against the emulator.

Context

Surfaced while implementing lagotto auto-create/auto-teardown of its DynamoDB tables (spore-host/lagotto#12). substrate version: v0.65.0.

Activity

  1. scttfrdmn commented on Jun 2, 2026

    @scttfrdmn
    OwnerAuthor

    Implemented in #300 (branch feat/issues-297-298-299). Will close on merge via the PR's Closes #298 keyword.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions