Repository navigation
Description
Surfaced while auditing resolveARN for #845. Filed rather than fixed there, because a correct arm needs a discrimination #844 has not landed yet.
What is missing
resolveARN (emulator/tagging_plugin.go) has no elasticloadbalancing arm at all. Its sixteen arms cover EC2, IAM, S3, Lambda, DynamoDB, SQS, SNS-adjacent services, API Gateway, Step Functions, ECR, ECS, RDS, ElastiCache, EFS, Glue, Cognito and Kinesis — and no ELB, of either generation.
So the Resource Groups Tagging API reaches no ELB resource today. TagResources with a load balancer, target group, listener or listener rule ARN falls through to the default case and fails at the resolver. That is true for ELBv2, which substrate models fully and which has a working elb_tags.go of its own — so #765's standing rule, that a tag written through one service must be readable through the other, is already unmet for ELBv2 and this release inherits that rather than introducing it.
Four types are taggable in substrate's own ELBv2 implementation and all four are unreachable here: load balancer, target group, listener and listener rule.
Why it is not a copy of the other arms
A classic and a v2 load-balancer ARN cannot be told apart by prefix. elbResourceKindFromARN (emulator/elb_tags.go) classifies by strings.Contains(arn, ":loadbalancer/"), which matches a classic ARN too, and elbStateKeyPrefix then scans the lb: prefix where v2 load balancers live. So a classic and a v2 load balancer of the same name collide in state, independently of the tagging API.
The discrimination has to be on ARN arity, not on a substring. The vendored emulator/authzref/elasticloadbalancing.json (v1.4) gives:
- classic — one segment after
loadbalancer/:arn:${Partition}:elasticloadbalancing:${Region}:${Account}:loadbalancer/${LoadBalancerName} - v2 — three:
…:loadbalancer/app/${LoadBalancerName}/${LoadBalancerId}
That collision is the real prerequisite, and it belongs with #844 (the classic API surface), where a classic load balancer can actually be created and the two can be told apart in a test rather than only in a hand-built state record.
Acceptance criteria
- The classic/v2 state collision is fixed first:
elbResourceKindFromARNdiscriminates on ARN arity, not on the:loadbalancer/substring, and a classic and a v2 load balancer of the same name do not share a state key. -
resolveARNgains anelasticloadbalancingarm reaching all four ELBv2 taggable types, keyed from the ARN's own account and Region (the SQS state keys disagree: the tagging API and the authorizer address queue:<name>, the plugin writes queue:<account>/<name> #826 rule). -
mergeResourceTagsgains the matching arm, editing the stored record's tags member without truncating the rest of it. - A tag written through
TagResourcesis readable through ELBv2's ownDescribeTags, and one written throughAddTagsis readable throughGetResources— cfn: the aws:cloudformation:* stamp covers EC2 only, so the rest of a stack is unstamped #765's rule, asserted in both directions. - A classic load balancer ARN is either handled or refused with a documented code, not silently keyed to a v2 record.
-
docs/services.mdstops implying the RGTA reaches ELB.
Depends on #844. Related: #835 (the eleven other missing types), #826 (the account-attribution rule), #765 (cross-readability).
Activity
scttfrdmn commentedon Sep 15, 2026
Deferred out of v0.116.0 to v0.117.0. Two corrections to this issue's premises, verified against the tree at
bd1dca7.The stated consequence is false as present tense
This issue says a classic and a v2 load balancer of the same name collide in state today. They do not.
elbResolveTaggedResource(elb_tags.go:296-306) compares exact ARN equality, so a classic ARN does not resolve a same-named v2 load balancer — it answersLoadBalancerNotFound/400. And nothing can write a classic record in the first place:elb_plugin.go:160is the only writer of alb:key, andcfn_deployer.go:2704has no classic arm.So the collision is prospective, arriving with #844 — which is the dependency this issue already declares. That does not make the issue wrong, it makes it a design constraint on #844 rather than a live defect. Worth stating plainly so nobody goes looking for a reproduction that does not exist.
AC 6 is vacuous
It asks that
docs/services.mdstop listing ELB as tag-reachable.docs/services.md:7647-7658— the enumeration that is actually correct — already omits ELB. Nothing to do.The good news, so #844 needs no re-researching
AWS's vendored reference resolves the open question recorded at
elb_authz.go:55-60: all seven classicDescribe*actions carry an emptyResourceslist inauthzref/elasticloadbalancing.json, which means AWS supports no resource-level permissions for them. So no authz-reference change is needed for the classic generation.And the arity discriminator this issue needs already exists:
elbChildARN'swantSegmentsparameter (elb_types.go:308-318). A classic ARN and a v2 ARN differ in segment count, so the existing helper distinguishes them without new machinery.What v0.116.0 changed for this issue
#865 made
MemoryStateManager.Listreturn lexicographic order, so all fourteen ELBDescribe*sites (elb_plugin.go:186,:226,:342,:381,:403,:450,:490,:542,:648,:687,:708,:850,:889,:915) are deterministic — every one of them was previously paging aMarker/PageSizecursor over Go's map hash seed, which can skip or repeat a resource across pages. That is unrelated to the collision but it is the substrate any dual-generation dispatch will be built on.Also filed from the same audit: #885 —
DescribeAccountLimitsis authorizable (authz_reference_gen.go:1424) but has no arm in the action switch (elb_plugin.go:47-95), so it answersunknownActionError. See the correction on #844.scttfrdmn commentedon Sep 16, 2026
Moved to the v0.118.0 milestone. It waits on #844, which this issue already declares as its dependency
and which also moved.
What changed this release, and it is the part worth reading before picking this up: #835 closed, so
TaggingPlugin.resolveARNnow carries twenty-two service arms andelasticloadbalancingis theconspicuous absence rather than one gap among eleven. More usefully, the pattern a new arm follows is
settled rather than per-service guesswork:
tagging_plugin.go. The ECS row (fix(tagging): GetResources reports no ECS service, task or task definition (part of #835) #935) is the clearest example — it delegates toecsTagStateKey,the same function ECS's own
TagResourcekeys through, which is what makes the two unable to drift.elbResolveTaggedResourcealready has an equivalent, so this arm should call it rather than parse.RequestContext(fix(ssm): a tag call resolves to the resource type it names, and the tagging API reaches a parameter (part of #835) #932 and its fivepredecessors). An ELB ARN carries both.
with an index key whose value is a JSON array of names, so it is now the default for a new row rather
than a per-service discovery.
ResourceTypeFilterstype is matched against the ARN's own delimited segment (fix(tagging): a ResourceTypeFilters type is matched as an unanchored prefix #936/Tagging API: a resource-type filter is a bare prefix match, soecs:taskalso selects task definitions #909), whichmatters here more than for most services:
loadbalancer/app/{name}/{id},loadbalancer/net/…,targetgroup/…andlistener/…all live in one namespace, andelbChildARN'swantSegmentsparameter is already the arity discriminator for telling them apart.
Unchanged: this issue's stated consequence is still false as present tense, as recorded during
v0.116.0 planning.
elbResolveTaggedResourcecompares exact ARN equality, so a classic ARN does not taga same-named v2 load balancer — it answers
LoadBalancerNotFound/400 — and nothing can write a classicrecord anyway. The collision is prospective and arrives with #844. AC 6 is likewise still vacuous:
docs/services.md's reachable-set list omits ELB entirely, so there is nothing there to correct.One ELB gap did close in v0.117.0 —
DescribeAccountLimitsnow routes and its limits are seedable(#885) — but that is the account-limits arm, not the tagging one.
feat(#844): the classic ELB API is routed by the Version a request ca…