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

ECS ManagedScalingInstanceWarmupPeriod minimum is 0 not 1 #24003

Closed
Vlaaaaaaad opened this issue Apr 2, 2022 · 3 comments
Closed

ECS ManagedScalingInstanceWarmupPeriod minimum is 0 not 1 #24003

Vlaaaaaaad opened this issue Apr 2, 2022 · 3 comments
Assignees
Labels
bug Addresses a defect in current functionality. service/ecs Issues and PRs that pertain to the ecs service.
Milestone

Comments

@Vlaaaaaaad
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

Terraform v1.1.7
on darwin_amd64
+ provider registry.terraform.io/hashicorp/aws v4.8.0

Affected Resource(s)

  • aws_ecs_capacity_provider

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

Happy to share the whole code (LaunchTemplate, ASG, ECS Cluster, VPC, and all the jazz), but the relevant part is:

resource "aws_ecs_capacity_provider" "autoscaling_group" {
  name = "example"

  auto_scaling_group_provider {
    auto_scaling_group_arn         = aws_autoscaling_group.asg.arn
    managed_termination_protection = "ENABLED"

    managed_scaling {
      instance_warmup_period    = 0
      maximum_scaling_step_size = 100
      minimum_scaling_step_size = 1
      target_capacity           = 90
      status                    = "ENABLED"
    }
  }
}

Expected Behavior

A minimum value of 0 should be allowed, as per aws-sdk-go:

"ManagedScalingInstanceWarmupPeriod": {
      "type": "integer",
      "max": 10000,
      "min": 0
    },

Actual Behavior

A minimum value of 1 is required based on the provider code in service/ecs/capacity_provider.go:

"instance_warmup_period": {
  Type:         schema.TypeInt,
  Optional:     true,
  Computed:     true,
  ValidateFunc: validation.IntBetween(1, 10000),
},

Steps to Reproduce

  1. terraform apply
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/ecs Issues and PRs that pertain to the ecs service. labels Apr 2, 2022
@ewbankkit ewbankkit added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Apr 2, 2022
@ewbankkit ewbankkit added this to the v5.0.0 milestone May 5, 2023
@ewbankkit ewbankkit self-assigned this May 5, 2023
@jar-b
Copy link
Member

jar-b commented May 23, 2023

Closed by #31231, merged to main via #31392

@jar-b jar-b closed this as completed May 23, 2023
@github-actions
Copy link

This functionality has been released in v5.0.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/ecs Issues and PRs that pertain to the ecs service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants