Describe the bug
Cluster.fromClusterAttributes does not properly set autoScalingGroup
Expected Behavior
autoScalingGroup to be set
Current Behavior
Is undefined which leads to NPEs.
Reproduction Steps
const vpc = new Vpc(this, 'Vpc', {});
const cluster = Cluster.fromClusterAttributes(this, 'Cluster', {
clusterName: 'my-cluster',
vpc,
securityGroups: [],
autoscalingGroup: new AutoScalingGroup(this, 'Asg', {
vpc,
instanceType: InstanceType.of(InstanceClass.A1, InstanceSize.MICRO),
machineImage: MachineImage.latestAmazonLinux2(),
}),
});
cluster.autoscalingGroup!.addUserData('yum install -y aws-cli');
Possible Solution
All ClusterAttributes should get set on the ImportCluster.
Additional Information/Context
No response
CDK CLI Version
2.126.0
Framework Version
No response
Node.js Version
v20.10.0
OS
OSX
Language
TypeScript
Language Version
No response
Other information
No response
Describe the bug
Cluster.fromClusterAttributesdoes not properly setautoScalingGroupExpected Behavior
autoScalingGroupto be setCurrent Behavior
Is
undefinedwhich leads to NPEs.Reproduction Steps
Possible Solution
All
ClusterAttributes should get set on theImportCluster.Additional Information/Context
No response
CDK CLI Version
2.126.0
Framework Version
No response
Node.js Version
v20.10.0
OS
OSX
Language
TypeScript
Language Version
No response
Other information
No response