Skip to content

fix(aws): ignore ASG desired_capacity drift#279

Open
as-potato wants to merge 1 commit into
DataDog:mainfrom
as-potato:fix/aws-asg-desired-capacity-drift
Open

fix(aws): ignore ASG desired_capacity drift#279
as-potato wants to merge 1 commit into
DataDog:mainfrom
as-potato:fix/aws-asg-desired-capacity-drift

Conversation

@as-potato
Copy link
Copy Markdown

What

Ignore changes to desired_capacity on the AWS scanner Auto Scaling Group.

Why

The Agentless Scanner ASG scales up/down outside Terraform during normal operation. When this happens, Terraform sees desired_capacity drift (to 0) and repeatedly plans to reset it to var.asg_size (default 1), causing noisy/flapping plans.

Ignoring desired_capacity follows the HashiCorp pattern for Auto Scaling Groups. See: https://developer.hashicorp.com/terraform/tutorials/aws/aws-asg#set-lifecycle-rule

Testing

  • Ran terraform fmt -recursive
  • Ran terraform validate

@as-potato as-potato requested a review from a team as a code owner May 5, 2026 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant