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

Add support for ECS capacity providers #11150

Closed
ryndaniels opened this issue Dec 5, 2019 · 3 comments · Fixed by #11151
Closed

Add support for ECS capacity providers #11150

ryndaniels opened this issue Dec 5, 2019 · 3 comments · Fixed by #11151
Assignees
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ecs Issues and PRs that pertain to the ecs service.
Milestone

Comments

@ryndaniels
Copy link
Contributor

ryndaniels commented Dec 5, 2019

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 "me too" comments, 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

Description

Based on this announcement, we want to add support for ECS capacity providers.

New or Affected Resource(s)

  • aws_ecs_cluster (add support for PutClusterCapacityProviders in update method, plus default_capacity_provider_strategy and capacity_providers arguments in schema)
  • awc_ecs_service (add capacity_provider_strategy to schema)
  • aws_ecs_capacity_provider (new resource)

Potential Terraform Configuration

New Resource: aws_ecs_capacity_provider

Create: CreateCapacityProvider
Read: DescribeCapacityProvider
Update: UpdateCapacityProvider
Delete: DeleteCapacityProvider

resource "aws_ecs_capacity_provider" "example" {
  name = "example" # Type: TypeString, Required: true
  tags = {}        # Type: TypeMap, Required: true

  auto_scaling_group_provider {         # Type: TypeList, Required: true, MaxItems: 1, Elem: *schema.Resource
    auto_scaling_group_arn = ""         # Type: TypeString, Required: true
    managed_termination_protection = "" # Type: TypeString, Required: true

    managed_scaling {               # Type: TypeList, Required: true, MaxItems: 1, Elem: *schema.Resource
      maximum_scaling_step_size = 1 # Type: TypeInt, Optional: true, Default: 10000
      minimum_scaling_step_size = 1 # Type: TypeInt, Optional: true, Default: 1
      status = ""                   # Type: TypeString, Optional: true (maybe Default: ENABLED)
      target_capacity = 1           # Type: TypeInt, Optional: true
    }
  }
}

Updated Resource: aws_ecs_cluster

(Only showing new arguments/API calls)

Update: PutClusterCapacityProviders

resource "aws_ecs_cluster" "example" {
  capacity_providers = [""] # Type: TypeList, Optional: true, Elem: *schema.Schema TypeString

  default_capacity_provider_strategy { # Type: TypeList, Optional: true, MaxItems: 1, Elem: *schema.Resource
    base = 1                           # Type: TypeInt, Optional: true,
    capacity_provider = ""             # Type: TypeString, Required: true
    weight = 1                         # Type: TypeInt, Optional: true
  }
}

Updated Resource: aws_ecs_service

(Only showing new arguments, no new API calls)

resource "aws_ecs_service" "example" {
  capacity_provider_strategy { # Type: TypeSet, Optional: true, Elem: *schema.Resource
    base = 1                   # Type: TypeInt, Optional: true,
    capacity_provider = ""     # Type: TypeString, Required: true
    weight = 1                 # Type: TypeInt, Optional: true
  }
}

References

@ryndaniels ryndaniels added the enhancement Requests to existing resources that expand the functionality or scope. label Dec 5, 2019
@ryndaniels ryndaniels self-assigned this Dec 5, 2019
@ghost ghost added the service/ecs Issues and PRs that pertain to the ecs service. label Dec 5, 2019
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 5, 2019
@ryndaniels ryndaniels removed the needs-triage Waiting for first response or review from a maintainer. label Dec 5, 2019
@bflad bflad added this to the v2.42.0 milestone Dec 12, 2019
@bflad
Copy link
Contributor

bflad commented Dec 12, 2019

Initial support for ECS Capacity Providers has been merged and will release with version 2.42.0 of the Terraform AWS Provider, shortly. This was a great effort by a few folks including @ryndaniels, @aeschright, @gdavison so kudos to those involved in making this happen. 🚀

@ghost
Copy link

ghost commented Dec 13, 2019

This has been released in version 2.42.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 for triage. Thanks!

Jo-Con-El added a commit to Jo-Con-El/terraform-provider-aws that referenced this issue Feb 19, 2020
Based on the schema description in hashicorp#11150, weight is optional (as of provider.aws v2.48.0.)
bflad pushed a commit that referenced this issue Feb 20, 2020
Based on the schema description in #11150, weight is optional (as of provider.aws v2.48.0.)
@ghost
Copy link

ghost commented Mar 28, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ecs Issues and PRs that pertain to the ecs service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants