I'm unable to configure the maxInstanceLifetime setting in autoscaling group to lower than 7 days
Reproduction Steps
runner_asg = autoscaling.AutoScalingGroup(
self,
'runner_asg',
vpc=vpc,
vpc_subnets=ec2.SubnetSelection(subnet_type=ec2.SubnetType.PRIVATE),
instance_type=ec2.InstanceType(instance_type_identifier=ec2_instance_size),
machine_image=ec2.MachineImage.latest_amazon_linux(),
signals=autoscaling.Signals.wait_for_all(),
init=ec2.CloudFormationInit.from_config(init_config),
role=iam_role,
block_devices=[
autoscaling.BlockDevice(
device_name='/dev/xvda',
volume=autoscaling.BlockDeviceVolume.ebs(30)
)
],
max_instance_lifetime=core.Duration.days(2)
)
What did you expect to happen?
It should succeed
What actually happened?
it fails with this error:
jsii.errors.JSIIError: maxInstanceLifetime must be between 7 and 365 days (inclusive).
According to cloudformation, anything above one day is acceptable: "The default is null. If specified, the value must be either 0 or a number equal to or greater than 86,400 seconds (1 day)."
Environment
- **CDK CLI Version :
1.78.0 (build 2c74f4c)
Other
This is 🐛 Bug Report
I'm unable to configure the maxInstanceLifetime setting in autoscaling group to lower than 7 days
Reproduction Steps
What did you expect to happen?
It should succeed
What actually happened?
it fails with this error:
jsii.errors.JSIIError: maxInstanceLifetime must be between 7 and 365 days (inclusive).According to cloudformation, anything above one day is acceptable: "The default is null. If specified, the value must be either 0 or a number equal to or greater than 86,400 seconds (1 day)."
Environment
1.78.0 (build 2c74f4c)Other
This is 🐛 Bug Report