-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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 Placement Strategy Forcing Service Rebuild #11644
Comments
Hi @hikerspath, thanks for the issue! This was recently fixed by @catsby in #11565, and should be included in the next minor version of Terraform (v0.8.6). Closing for now, but happy to discuss further! |
Hi @grubernaut Snippet from the terraform plan
|
I'm seeing this as well. Is there any workaround until the bug is fixed (other than not using placement strategies at all) ? |
Also seeing this in 0.8.7. |
Seeing this in 0.8.8, based on the output I'm seeing (below) it appears that a unique
|
Sorry, please disregard the above comment, I don't think it's particularly informative. I have just realised I had previously specified my
This suggests that AWS does care about the input being in the correct case which makes me think that 7e9bfda won't work in the event that the I would offer to try and help resolve the issue but I don't (yet) know Go! Hope this helps someone get closer to a fix implementation though. |
ECS has some incosistency in the way it sends down field names and theway it expectes them in the api. `MEMORY` and `CPU` are expected capitalized and `instanceId` should be sent as is. The previous fixed lowercased everything, meaning `instanceId` is being saved as `instanceid` and causing a change in the resource. PRs and issues * hashicorp#12199 * hashicorp#11644 * hashicorp#11844
AWS API requires ECS placement strategies "field" attribute to be "memory" or "cpu" (lowercase) when type=bin, but these read back as "MEMORY" and "CPU" (uppercase) respectively. PR #11565 (which fixed separately reported #11644) deals with this by always lowering the case of the resource received from the API, but this breaks for other "field" values (e.g. "instanceId" -> "instanceid"). This PR only lowers the case of the returned resource when field "MEMORY" or "CPU". Haven't checked if any other fields need this treatment.
Closed via #12998 |
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. |
We are observing a rebuild of ECS services that are making use of the new placement_strategy options. Basically seems to be a case-test issue if not something more. The app only accepts lowercase field values as your documentation was updated to state (#11338). However there appears to be a case mis-match that is causing the service to rebuild on a static (no changes to apply) run of terraform apply.
Terraform Version
Affected Resource:
Terraform Configuration:
Debug:
Expected Behavior
Should not destroy a service that is not technically changing anything (No terraform code was altered in the static run)
Note: If you remove the placement_strategy block and build, ensuing builds function as expected. It is only with the placement strategy that you see the failures noted.
Actual Behavior
Service is destroyed and re-created at every apply regardless of whether something in the service has changed.
Steps to Reproduce
terraform apply
(First to build the ECS service)terraform apply
(Second time which should result in no changes)The text was updated successfully, but these errors were encountered: