diff --git a/cloudmock/aws/mockautoscaling/warmpool.go b/cloudmock/aws/mockautoscaling/warmpool.go index 2e23069310048..841d48e348470 100644 --- a/cloudmock/aws/mockautoscaling/warmpool.go +++ b/cloudmock/aws/mockautoscaling/warmpool.go @@ -28,3 +28,7 @@ func (m *MockAutoscaling) DescribeWarmPool(input *autoscaling.DescribeWarmPoolIn } return ret, nil } + +func (m *MockAutoscaling) DeleteWarmPool(*autoscaling.DeleteWarmPoolInput) (*autoscaling.DeleteWarmPoolOutput, error) { + return &autoscaling.DeleteWarmPoolOutput{}, nil +} diff --git a/pkg/model/awsmodel/autoscalinggroup.go b/pkg/model/awsmodel/autoscalinggroup.go index 4411d6fa64a67..51decec9f4334 100644 --- a/pkg/model/awsmodel/autoscalinggroup.go +++ b/pkg/model/awsmodel/autoscalinggroup.go @@ -90,8 +90,9 @@ func (b *AutoscalingGroupModelBuilder) Build(c *fi.ModelBuilderContext) error { { enabled := fi.Bool(warmPool.IsEnabled()) warmPoolTask := &awstasks.WarmPool{ - Name: &name, - Enabled: enabled, + Name: &name, + Lifecycle: b.Lifecycle, + Enabled: enabled, } if warmPool.IsEnabled() { warmPoolTask.MinSize = warmPool.MinSize diff --git a/upup/pkg/fi/cloudup/awstasks/warmpool.go b/upup/pkg/fi/cloudup/awstasks/warmpool.go index afe9627417a49..f775297c1381f 100644 --- a/upup/pkg/fi/cloudup/awstasks/warmpool.go +++ b/upup/pkg/fi/cloudup/awstasks/warmpool.go @@ -59,16 +59,18 @@ func (e *WarmPool) Find(c *fi.Context) (*WarmPool, error) { } if warmPool.WarmPoolConfiguration == nil { return &WarmPool{ - Name: e.Name, - Enabled: fi.Bool(false), + Name: e.Name, + Lifecycle: e.Lifecycle, + Enabled: fi.Bool(false), }, nil } actual := &WarmPool{ - Name: e.Name, - Enabled: fi.Bool(true), - MaxSize: warmPool.WarmPoolConfiguration.MaxGroupPreparedCapacity, - MinSize: fi.Int64Value(warmPool.WarmPoolConfiguration.MinSize), + Name: e.Name, + Lifecycle: e.Lifecycle, + Enabled: fi.Bool(true), + MaxSize: warmPool.WarmPoolConfiguration.MaxGroupPreparedCapacity, + MinSize: fi.Int64Value(warmPool.WarmPoolConfiguration.MinSize), } return actual, nil }