Skip to content

elbv2: tagging, so elasticloadbalancing:CreateAction has a producer #748

Closed

Description

@scttfrdmn

Follow-up from #730's condition-key survey.

One bundled statement conditions on elasticloadbalancing:CreateAction: it allows
elasticloadbalancing:AddTags only when the tagging happens as part of a create, e.g.

{"Effect":"Allow","Action":"elasticloadbalancing:AddTags","Resource":"*",
 "Condition":{"StringEquals":{"elasticloadbalancing:CreateAction":
   ["CreateTargetGroup","CreateLoadBalancer"]}}}

The key has no producer, and the reason is bigger than the key: the ELB plugin has no tagging
at all.
There is no AddTags, no RemoveTags, no DescribeTags, and ELBLoadBalancer.Tags
is never read or written. So the action the statement conditions does not exist, and a consumer
whose stack tags a load balancer or target group — which CDK does by default — gets no tags
back from any read.

elasticloadbalancing:CreateAction is the ELB analogue of the aws:TagKeys-style
create-and-tag pattern substrate already models for EC2: the tagging call made as part of a
create carries the name of the create it belongs to, and a standalone AddTags does not. That
distinction is what the condition tests, so it needs the create paths to know they are tagging
on behalf of a create.

Verify shapes and error codes against API_AddTags.html, API_RemoveTags.html and
API_DescribeTags.html in the Elastic Load Balancing v2 API reference, plus the
ResourceArns/tag-limit rules, before implementing.

Acceptance criteria

  • AddTags, RemoveTags and DescribeTags exist for load balancers, target groups,
    listeners and rules, with shapes and error codes verified against the AWS reference.
  • CreateLoadBalancer, CreateTargetGroup, CreateListener and CreateRule persist the
    Tags they accept, and those tags are readable through DescribeTags.
  • elasticloadbalancing:CreateAction is populated for the tagging that a create performs
    and absent for a standalone AddTags, so the bundled statement allows the first and
    denies the second.
  • A test shows both halves of that distinction.
  • docs/services.md's producerless-key table drops the row and the count is corrected; the
    ELB coverage matrix picks up the new operations.
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