pjfanning opened a new pull request, #725:
URL: https://github.com/apache/pekko-management/pull/725
The `aws-api-ec2` integration test used legacy `com.amazonaws` (SDK v1) for
CloudFormation and AutoScaling, while the rest of the project already adopts
`software.amazon.awssdk` (SDK v2).
## Changes
- **`project/Dependencies.scala`**: Extracted `awsSdkV2Version = "2.42.19"`
constant; updated existing `ecs` v2 dependency to reference it
- **`integration-test/aws-api-ec2/build.sbt`**: Replaced
`com.amazonaws:aws-java-sdk-cloudformation` and
`com.amazonaws:aws-java-sdk-autoscaling` with their `software.amazon.awssdk`
equivalents (with `apache-client` excluded, consistent with the ECS dependency)
- **`IntegrationTest.scala`**: Migrated CloudFormation API from v1
mutable-builder style to v2 immutable-builder pattern; updated response types
and accessors
**Before:**
```scala
private val awsCfClient =
AmazonCloudFormationClientBuilder.standard().withRegion(region).build()
val createStackRequest = new CreateStackRequest()
.withCapabilities("CAPABILITY_IAM")
.withStackName(stackName)
.withParameters(new
Parameter().withParameterKey("Build").withParameterValue(...))
var dsr: DescribeStacksResult = null
stack.getStackStatus == StackStatus.CREATE_COMPLETE.toString
stack.getOutputs.asScala.exists(_.getOutputKey == "AutoScalingGroupName")
```
**After:**
```scala
private val awsCfClient =
CloudFormationClient.builder().region(Region.of(region)).build()
val createStackRequest = CreateStackRequest.builder()
.capabilities(Capability.CAPABILITY_IAM)
.stackName(stackName)
.parameters(Parameter.builder().parameterKey("Build").parameterValue(...).build())
.build()
var dsr: DescribeStacksResponse = null
stack.stackStatus() == StackStatus.CREATE_COMPLETE
stack.outputs().asScala.exists(_.outputKey() == "AutoScalingGroupName")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]