Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29404

AutoScalingGroup / BlockDevice

$
0
0

we are merging our CloudFormation Templates to aws-cdk. Creating AutoScalingGroup seems to be rather easy. But now I cann`t find how to configure the BlockDeviceMappings known from cloudformation. In cdk I saw it at CfnLaunchConfiguration, but in that case I don´t see how to get it from the AutoScalingGroup-Object or how to inject my own one.

Best regards

Oliver

Additional:

Hi @calestini, not very much... i created the autoscaling group via L2

    let asg = new autoscaling.AutoScalingGroup(
        this.scope,
        this.halfQualifiedName + '-asg',
        {
            instanceType: this.props.instanceType,
            machineImage:  new GenericLinuxImage({
                'eu-west-1': this.props.imageId,
            }),
            associatePublicIpAddress: false,
            updateType: autoscaling.UpdateType.ROLLING_UPDATE,
            desiredCapacity: this.props.desiredCapacity,
            vpc: this.scope.vpc,
            rollingUpdateConfiguration: {
                pauseTime: Duration.minutes(5),
                maxBatchSize: 1,
                minInstancesInService: this.props.minInstancesInService,
            },
            maxCapacity: this.props.maxCapacity,
            minCapacity: this.props.minCapacity,
            keyName: this.scope.ec2KeyName
        }
    )
}

and searched the docu for how to add the EBS Volumes. Nothing to find in de cdk-L2 Objects. Then I synth the cloudformation script and saw, that the L2 automaticaly generates not only the autoscaling group, but the LauchConfig too. So I start to configure an own instance of the CnfLauchConfiguration but didn´t find, how to inject it in the L2 ASG. Then I studied the docu how to get the implicit generated one... nothing to find in the docu. So I ended here...


Viewing all articles
Browse latest Browse all 29404

Trending Articles