Untitled conversation
- User
[BUG] ELBv2 DescribeListenerAttributes and DescribeCapacityReservation return UnsupportedOperation (breaks @pulumi/aws refresh)
Service
ELBv2 (Elastic Load Balancing v2)
AWS API Action
DescribeListenerAttributesandDescribeCapacityReservationExpected behavior
DescribeListenerAttributesreturns the listener's attribute list (empty by default until attributes are set).DescribeCapacityReservationreturns the load balancer's capacity reservation status (empty/none when no capacity is reserved).
Both are normal management-plane reads that the AWS SDKs issue during resource refresh.
Actual behavior
Both actions return:
api error UnsupportedOperation: Action DescribeListenerAttributes is not supported. api error UnsupportedOperation: Action DescribeCapacityReservation is not supported.@pulumi/aws6.66.0+ (and recent Terraform AWS provider versions) call these two actions when refreshing existingLoadBalancer/Listenerresources. Because Floci returnsUnsupportedOperation, the provider errors out on refresh. The only workaround today is pinning@pulumi/awsto a version that predates these calls (e.g.6.30.0).ELBv2 is otherwise well supported in Floci — only these two read actions are missing from
ElbV2QueryHandler's action switch.Reproduction
# Assuming a load balancer + listener already exist (CreateLoadBalancer / CreateListener): aws --endpoint-url http://localhost:4566 elbv2 describe-listener-attributes \ --listener-arn arn:aws:elasticloadbalancing:us-east-1:000000000000:listener/app/my-lb/abc/def # -> UnsupportedOperation: Action DescribeListenerAttributes is not supported. aws --endpoint-url http://localhost:4566 elbv2 describe-capacity-reservation \ --load-balancer-arn arn:aws:elasticloadbalancing:us-east-1:000000000000:loadbalancer/app/my-lb/abc # -> UnsupportedOperation: Action DescribeCapacityReservation is not supported.Environment
- Floci version / image tag:
1.5.18(floci/floci:latest); also present on currentmain - AWS provider that triggers it:
@pulumi/aws6.66.0+ (works when pinned to 6.30.0) - How you're running Floci: Docker / Docker Compose
A PR implementing
DescribeListenerAttributes,ModifyListenerAttributes, and (mirroring the existing load balancer / target group attribute handlers) will reference this issue. - Assistant
Now let me check the Listener model for an attributes map:
- Assistant
The Listener model already has an
attributesmap. Let me check existing tests: - Assistant
I have the full picture. The
Listenermodel already has anattributesmap. I'll add the service methods, the handler cases, and tests.1. Service methods — listener attributes after
modifyListener, and a capacity reservation section: - Assistant
2. Handler switch cases:
- Assistant
3. Handler methods — mirroring the LB attribute handlers, plus the capacity reservation handler:
- Assistant
4. Tests — let me see the listener test section to insert new tests after order 32:
- Assistant
Now build and run the ELBv2 tests:
- Assistant
Only the empty-attributes assertion needs adjusting — REST-assured returns a node object for missing children. Use
size(): - Assistant
All green. The fix is complete:
Changes
ElbV2Service.javadescribeListenerAttributes(region, arn)— validates the listener (ListenerNotFoundotherwise) and returns a copy of its attributes map; theListenermodel already had anattributesfield.modifyListenerAttributes(region, arn, newAttrs)— merges new key/value pairs into the listener's attributes.CapacityReservationrecord(decreaseRequestsRemaining, minimumCapacityUnits, lastModifiedTime)plusdescribeCapacityReservation(region, arn)— validates the load balancer (LoadBalancerNotFoundotherwise) and returns all-null fields since Floci doesn't emulate reserved LCUs.
ElbV2QueryHandler.java- Added switch cases for
DescribeListenerAttributes, , and (previously fell through to ).
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.