Description
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 bycreateImage/registerImage, and its tags are already rendered byDescribeImages'tagSet.lt-(launch-template) —CreateLaunchTemplateacceptsTagSpecification.fleet-(fleet) —DescribeFleetsrenders atagSet.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
CreateTagsthenDescribeTagsround-trips a tag on each type,
and thatDeleteTagsremoves it. -
docs/services.mdstates which EC2 resource typesCreateTagscan reach, with no
remaining silent no-op.
Activity
feat(ec2): CreateTags reaches every taggable resource type (#708) (#721)