Skip to content

ec2: CreateTags cannot reach an image, launch template, fleet, placement group or key pair #708

Closed

Description

@scttfrdmn

Filed out of #689, which added the snap- arm to ec2TaggableResource
(emulator/ec2_plugin.go:2531-2570) after #670 added vol-. Five prefixes still have no arm,
and every one of them names a record that already stores a "tags" member:

  • ami- (image) — written by createImage/registerImage, and its tags are already rendered by DescribeImages' tagSet.
  • lt- (launch-template) — CreateLaunchTemplate accepts TagSpecification.
  • fleet- (fleet) — DescribeFleets renders a tagSet.
  • pg- (placement-group), and a key pair, which is named rather than ID-prefixed.

The consequence is the exact bug #670 fixed for volumes and #689 fixed for snapshots:
CreateTags on one of these IDs falls through to default: and answers success having written
nothing. DescribeTags (#688) already reports tags on all of them, because its scan reads
state directly — so substrate can show a tag it has no way to set.

Each arm needs its own verification before it can be written, which is why #689 did not guess:
the state-key spelling differs per type, and a key pair is identified by name rather than by an
ID prefix, so ec2TaggableResource's prefix switch cannot dispatch it at all without a
different shape.

Acceptance criteria

  • For each of image, launch-template, fleet, placement-group and key-pair: the ARN resource
    type and ID form verified against that resource's own AWS documentation, recorded in the
    arm's comment.
  • An arm per type, or a stated reason it cannot have one (key pairs).
  • A table-driven test that CreateTags then DescribeTags round-trips a tag on each type,
    and that DeleteTags removes it.
  • docs/services.md states which EC2 resource types CreateTags can reach, with no
    remaining silent no-op.
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions