ISSUE DESCRIPTION [BUG] ELBv2 DescribeListenerAttributes and DescribeCapacityReservation…
- User
ISSUE DESCRIPTION
[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:
codeapi 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
bash# 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. Assistant
Let me start by understanding the repository structure and then look at the specific files mentioned in the issue description.
The issue is about implementing two missing AWS API actions in the ELBv2 service:
DescribeListenerAttributes- returns listener attributesDescribeCapacityReservation- returns load balancer capacity reservation
Let me explore the repository structure first.
Assistant
Let me find the ELBv2 related files:
Assistant
Let me look at the main files:
ElbV2QueryHandler.javaandElbV2Service.java.Assistant
Let me try a different command format.
Assistant
Now let me look at the
ElbV2Service.java:Assistant
Let me check the model classes to understand the existing data
Assistant
Let me run one command at a time.
Assistant
Good, the Listener already has
attributes. Now let me check the LoadBalancerAssistant
Let me see the models directory and the full QueryHandler.
Assistant
Let me see the full QueryHandler, particularly the listener-related
Assistant
Let me see the full ElbV2QueryHandler from line 383 to the end and also around line 750 onwards for the listenerXml:
Assistant
Let me see the target group attributes pattern and listener
Assistant
Let me see the full ElbV2Service to understand listener management:
Assistant
Now let me check if there are any existing tests that can help me understand the patterns
Assistant
Now I have a thorough understanding. Let me implement the changes:
- Create
CapacityReservation.javamodel - Add service methods to
ElbV2Service.java - Add query handlers to
ElbV2QueryHandler.java
Let me start by creating the model class:
- Create
Assistant
Now let me add the service methods to
ElbV2Service.java. Let me find the right location:Assistant
Let me see the exact lines around the modifyListener method end and the rules section start
Assistant
Now let me add the service methods. First, let me add
describeListenerAttributesandmodifyListenerAttributesaftermodifyListener:Assistant
Now let me add
describeCapacityReservation. Let me find the right location near load balancerAssistant
Let me look at the
setIpAddressTypemethod to find the right place to adddescribeCapacityReservation:Assistant
Now let me add
describeCapacityReservationmethod after `setIpAddressTypeAssistant
Now let me update the
ElbV2QueryHandler.java. Let me check the imports firstAssistant
Good -
model.*is already imported. Now let me add the three new cases in the switch statement:Assistant
Let me add the cases. First, add DescribeListenerAttributes and ModifyListenerAttributes after Modify
Assistant
Let me add the three cases. First,
DescribeCapacityReservationafter `SetIpAddressTypeAssistant
Now add
DescribeListenerAttributesandModifyListenerAttributesafter the listenerAssistant
Add the listener attribute cases after line
Assistant
Now let me add the handler methods. First, let me find where to add them
Assistant
Let me see where handleSetIpAddressType ends and where handleModifyListener
Assistant
Now add
handleDescribeCapacityReservationbefore Target Groups section:Assistant
Now add the listener attribute handlers after `handleModifyListener
Assistant
Let me see the end of `handleModifyListener
Assistant
Add the listener attribute handlers before the Rules section:
Assistant
Now let me verify the changes look correct
Assistant
Let me verify the service methods too
Assistant
Now let me try to compile the project and run the existing tests
Assistant
Let me check what build tools are available
Assistant
Let me try running mvn directly
Assistant
Project compiles. Let me run the existing ELBv2 integration
Assistant
All 27 existing tests pass. Now let me verify my changes by looking at the final state of the files:
Assistant
Good. Now let me check the listener attribute methods:
Assistant
Now let me verify the query handler methods:
Assistant
Let me check the listener attributes handler
Assistant
Let me verify the switch cases are correct:
Assistant
Let me verify the CapacityReservation model class exists and looks correct:
Assistant
Let me also run the Lambda integration test to be safe:
Assistant
Let me also check the SDK test for ELBv2:
Assistant
Let me check if the SDK test references the new actions:
Assistant
Let me review the full diff of all changes:
Assistant
Let me check the new file too
Assistant
Let me do a final compile and run all ELBv2 tests one more time to be sure:
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.