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_service capacity_provider_strategy forces replacement even though CLI doesn not #20059

Closed
richardgavel opened this issue Jul 2, 2021 · 3 comments
Labels
bug Addresses a defect in current functionality. service/ecs Issues and PRs that pertain to the ecs service.

Comments

@richardgavel
Copy link

richardgavel commented Jul 2, 2021

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 0.12.31
provider 3.47.0

Affected Resource(s)

  • aws_ecs_service

Terraform Configuration Files

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

aws_ecs_service foo {
  capacity_provider_strategy {
   base = var.fargate_base
    capacity_provider = "FARGATE"
    weight            = var.fargate_weight
  }
  capacity_provider_strategy {
    capacity_provider = "FARGATE_SPOT"
    weight            = var.fargate_spot_weight
  }
}

Expected Behavior

The ecs service capacity provider strategy is updated in place on the existing service and a new deployment is forced.

Actual Behavior

Terraform plan shows the need to force replacement.

image

Important Factoids

When I run the aws ecs update-service call, I can update the capacity provider strategy in place without any issues.
What is odd is that the update method of the provider seems to be coded to handle the possibility of a change in the capacity provider strategy (https://github.com/hashicorp/terraform-provider-aws/blob/main/aws/resource_aws_ecs_service.go#L1113), but the schema does not (https://github.com/hashicorp/terraform-provider-aws/blob/main/aws/resource_aws_ecs_service.go#L42), based on my admittedly limited understanding of providers.

  • #0000
@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 Jul 2, 2021
@ewbankkit ewbankkit added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 2, 2021
@ewbankkit
Copy link
Contributor

@ewbankkit
Copy link
Contributor

@richardgavel Thanks for raising this issue.
It has already been noticed in #11351. I'm going to close this one as a duplicate so that we can concentrate discussion in the linked issue.
Please add any additional comments there.

@github-actions
Copy link

github-actions bot commented Aug 2, 2021

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 Aug 2, 2021
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

No branches or pull requests

2 participants