Skip to content

tagging: resolveARN has no elasticloadbalancing arm, so the Resource Groups Tagging API reaches no ELB resource #863

Closed

Description

@scttfrdmn

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

Depends on #844. Related: #835 (the eleven other missing types), #826 (the account-attribution rule), #765 (cross-readability).

Activity

  1. added this to the v0.116.0 milestone on Sep 14, 2026
  2. added
    type: bug
    on Sep 14, 2026
  3. scttfrdmn commented on Sep 15, 2026

    @scttfrdmn
    OwnerAuthor

    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 answers LoadBalancerNotFound/400. And nothing can write a classic record in the first place: elb_plugin.go:160 is the only writer of a lb: key, and cfn_deployer.go:2704 has 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.md stop 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 classic Describe* actions carry an empty Resources list in authzref/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's wantSegments parameter (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.List return lexicographic order, so all fourteen ELB Describe* 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 a Marker/PageSize cursor 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 — DescribeAccountLimits is authorizable (authz_reference_gen.go:1424) but has no arm in the action switch (elb_plugin.go:47-95), so it answers unknownActionError. See the correction on #844.

  4. modified the milestones: v0.116.0, v0.117.0 on Sep 15, 2026
  5. scttfrdmn commented on Sep 16, 2026

    @scttfrdmn
    OwnerAuthor

    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.resolveARN now carries twenty-two service arms and elasticloadbalancing is the
    conspicuous absence rather than one gap among eleven. More usefully, the pattern a new arm follows is
    settled rather than per-service guesswork:

    Unchanged: this issue's stated consequence is still false as present tense, as recorded during
    v0.116.0 planning. elbResolveTaggedResource compares exact ARN equality, so a classic ARN does not tag
    a same-named v2 load balancer — it answers LoadBalancerNotFound/400 — and nothing can write a classic
    record 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 — DescribeAccountLimits now routes and its limits are seedable
    (#885) — but that is the account-limits arm, not the tagging one.

  6. modified the milestones: v0.117.0, v0.118.0 on Sep 16, 2026
  7. added a commit that references this issue on Sep 19, 2026
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

    type: bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions