Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS::AutoScaling::AutoScalingGroup - False-positive drift if DefaultInstanceWarmup is set #1466

Open
rgoltz opened this issue Dec 31, 2022 · 1 comment

Comments

@rgoltz
Copy link

rgoltz commented Dec 31, 2022

Name of the resource

AWS::AutoScaling::AutoScalingGroup

Resource Name

No response

Issue Description

Once you create a stack containing a AWS::AutoScaling::AutoScalingGroup and the property DefaultInstanceWarmup is set in CloudFormation template, the CloudFormation drift detection reporting such stack as drifted - Even the DefaultInstanceWarmup is set correctly on the created ASG (details see "Observed Behavior").

Expected Behavior

Stack is in state IN_SYNC, since template and resource have the same, correct setting.

Observed Behavior

Following CloudFormation documentation the setting DefaultInstanceWarmup is supported. Furthermore CDK also added support for this property recently aws/aws-cdk#23285 + aws/aws-cdk#23180.

If you set DefaultInstanceWarmup in your CFN template (e.g. to 500), your stack / this resource is in state DRIFTED after running CFN Drift detection - Details see: "Test Case".

Test Cases

** Create new Stack using following example (please mind to adjust LaunchTemplateId + VPCZoneIdentifier fitting your account) in eu-central-1

---
AWSTemplateFormatVersion: '2010-09-09'
Description: CFN Drift detection - ASG - DefaultInstanceWarmup issue - case 11177102011

Resources:
  AsgWithDefaultInstanceWarmupSet:
    Type: AWS::AutoScaling::AutoScalingGroup
    Properties:
      AutoScalingGroupName: test-asg-rogo-1
      MinSize: 0
      MaxSize: 0
      LaunchTemplate:
        LaunchTemplateId: lt-IdAddedHere
        Version: 20
      VPCZoneIdentifier:
      - subnet-111IdAddedHere
      - subnet-222IdAddedHere
      - subnet-333IdAddedHere
      Tags:
      - Key: ReferenceID
        Value: 11177102011
        PropagateAtLaunch: false
      DefaultInstanceWarmup: 500

** After stack is created, please check your ASG resource in Console for DefaultInstanceWarmup (EC2 -> Auto Scaling Groups -> Click on your ASG -> Go down to "Advanced configurations" -> "Default instance warmup") - Here in the example it's set to 500 Sec correctly.
SettingASG

** Go to CFN Console and run CFN Drift detection via: (in Console using "Stack actions" => "Detect drift". After you triggered this process, please wait for ca. 1 min and check again the Drift status: Stack went in state DRIFTED. Check the Drift-Details - You will the Drift for DefaultInstanceWarmup property.
DriftOverview

Other Details

@rgoltz rgoltz added the bug label Dec 31, 2022
@rgoltz
Copy link
Author

rgoltz commented Jan 21, 2023

Update after checking with CFN-team: Currently they prioritizing +planning a fix. Our next checkpoint with CFN-team is middle of March 2023.

@cfn-github-issues-bot cfn-github-issues-bot added this to Researching in coverage-roadmap Nov 16, 2023
@cfn-github-issues-bot cfn-github-issues-bot moved this from Researching to Coming Soon in coverage-roadmap Dec 20, 2023
@cfn-github-issues-bot cfn-github-issues-bot moved this from Coming Soon to Researching in coverage-roadmap Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
coverage-roadmap
  
Researching
Development

No branches or pull requests

2 participants