-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Allow ECS Service Capacity Provider Updates #20707
Allow ECS Service Capacity Provider Updates #20707
Conversation
cc: @breathingdust Friendly ping for this small PR. Could I please get a review or what I can do to get this approved? |
Pull request #21306 has significantly refactored the AWS Provider codebase. As a result, most PRs opened prior to the refactor now have merge conflicts that must be resolved before proceeding. Specifically, PR #21306 relocated the code for all AWS resources and data sources from a single We recognize that many pull requests have been open for some time without yet being addressed by our maintainers. Therefore, we want to make it clear that resolving these conflicts in no way affects the prioritization of a particular pull request. Once a pull request has been prioritized for review, the necessary changes will be made by a maintainer -- either directly or in collaboration with the pull request author. For a more complete description of this refactor, including examples of how old filepaths and function names correspond to their new counterparts: please refer to issue #20000. For a quick guide on how to amend your pull request to resolve the merge conflicts resulting from this refactor and bring it in line with our new code patterns: please refer to our Service Package Refactor Pull Request Guide. |
@zhelding conflicts resolved :) |
@zhelding @breathingdust hi all, just a friendly bump. is there anything else i can do to get this in the next release? |
Hi @nitrocode! No further action is required on your part. We will now review your PR as part of our standard triage prioritization process (see here). Unfortunately, we can't guarantee that your PR will get a review in a timely manner, but we will get to it as soon as we have capacity. Thanks again for your contribution! |
@nitrocode as an enterprise customer, we presented a fork we actively use to correct this issue over a year ago and we’re still yet to see a formal solution. |
Super interested in seeing this merged. Fixes an issue that caused us downtime where |
24a4c13
to
4b349e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! 🎉
Output from acceptance tests (us-west-2
):
% make testacc TESTS=TestAccECSService PKG=ecs
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecs/... -v -count 1 -parallel 20 -run='TestAccECSService' -timeout 180m
--- PASS: TestAccECSService_PlacementStrategy_missing (3.96s)
--- PASS: TestAccECSService_DaemonSchedulingStrategy_basic (50.68s)
--- PASS: TestAccECSService_PlacementConstraints_emptyExpression (81.63s)
--- PASS: TestAccECSService_DaemonSchedulingStrategy_setDeploymentMinimum (40.52s)
--- PASS: TestAccECSService_executeCommand (93.28s)
--- PASS: TestAccECSService_PlacementConstraints_basic (93.93s)
--- PASS: TestAccECSService_forceNewDeployment (94.00s)
--- PASS: TestAccECSService_Tags_managed (95.75s)
--- PASS: TestAccECSService_replicaSchedulingStrategy (97.32s)
--- PASS: TestAccECSServiceDataSource_basic (97.34s)
--- PASS: TestAccECSService_PlacementStrategy_basic (98.25s)
--- PASS: TestAccECSService_Tags_basic (104.73s)
--- PASS: TestAccECSService_LaunchTypeEC2_network (122.27s)
--- PASS: TestAccECSService_DeploymentControllerType_external (58.65s)
--- PASS: TestAccECSService_iamRole (50.11s)
--- PASS: TestAccECSService_LaunchTypeFargate_waitForSteadyState (165.08s)
--- PASS: TestAccECSService_DeploymentValues_minZeroMaxOneHundred (72.20s)
--- PASS: TestAccECSService_clusterName (72.16s)
--- PASS: TestAccECSService_LaunchTypeFargate_platformVersion (172.92s)
--- PASS: TestAccECSService_LaunchTypeFargate_basic (173.31s)
--- PASS: TestAccECSService_ServiceRegistries_container (174.13s)
--- PASS: TestAccECSService_ServiceRegistries_basic (170.46s)
--- PASS: TestAccECSService_LaunchTypeFargate_updateWaitForSteadyState (175.54s)
--- PASS: TestAccECSService_DeploymentValues_basic (87.44s)
--- PASS: TestAccECSService_deploymentCircuitBreaker (87.62s)
--- PASS: TestAccECSService_loadBalancerChanges (111.42s)
--- PASS: TestAccECSService_Tags_propagate (215.96s)
--- PASS: TestAccECSService_CapacityProviderStrategy_multiple (81.98s)
--- PASS: TestAccECSService_renamedCluster (90.92s)
--- PASS: TestAccECSService_basicImport (81.22s)
--- PASS: TestAccECSService_CapacityProviderStrategy_forceNewDeployment (133.56s)
--- PASS: TestAccECSService_disappears (88.99s)
--- PASS: TestAccECSService_multipleTargetGroups (261.24s)
--- PASS: TestAccECSService_basic (89.68s)
--- PASS: TestAccECSService_PlacementStrategy_unnormalized (92.55s)
--- PASS: TestAccECSService_familyAndRevision (101.23s)
--- PASS: TestAccECSService_ServiceRegistries_changes (340.52s)
--- PASS: TestAccECSService_DeploymentControllerType_codeDeploy (248.34s)
--- PASS: TestAccECSService_healthCheckGracePeriodSeconds (260.77s)
--- PASS: TestAccECSService_alb (249.43s)
--- PASS: TestAccECSService_CapacityProviderStrategy_basic (182.06s)
--- PASS: TestAccECSService_CapacityProviderStrategy_update (228.79s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ecs 395.248s
Output from acceptance tests (GovCloud):
% make testacc TESTS=TestAccECSService PKG=ecs
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ecs/... -v -count 1 -parallel 20 -run='TestAccECSService' -timeout 180m
--- PASS: TestAccECSService_PlacementStrategy_missing (4.94s)
--- PASS: TestAccECSService_DaemonSchedulingStrategy_basic (40.12s)
--- PASS: TestAccECSService_DaemonSchedulingStrategy_setDeploymentMinimum (59.07s)
--- PASS: TestAccECSService_ServiceRegistries_basic (80.65s)
--- PASS: TestAccECSService_Tags_managed (89.98s)
--- PASS: TestAccECSService_PlacementConstraints_emptyExpression (90.21s)
--- PASS: TestAccECSService_replicaSchedulingStrategy (90.21s)
--- PASS: TestAccECSServiceDataSource_basic (90.31s)
--- PASS: TestAccECSService_ServiceRegistries_container (114.33s)
--- PASS: TestAccECSService_LaunchTypeEC2_network (119.98s)
--- PASS: TestAccECSService_PlacementConstraints_basic (117.62s)
--- PASS: TestAccECSService_Tags_basic (124.68s)
--- PASS: TestAccECSService_executeCommand (126.84s)
--- PASS: TestAccECSService_PlacementStrategy_basic (103.24s)
--- PASS: TestAccECSService_forceNewDeployment (90.02s)
--- PASS: TestAccECSService_LaunchTypeFargate_basic (157.93s)
--- PASS: TestAccECSService_DeploymentValues_minZeroMaxOneHundred (90.32s)
--- PASS: TestAccECSService_LaunchTypeFargate_platformVersion (173.26s)
--- PASS: TestAccECSService_clusterName (91.24s)
--- PASS: TestAccECSService_LaunchTypeFargate_waitForSteadyState (183.95s)
--- PASS: TestAccECSService_DeploymentControllerType_external (62.89s)
--- PASS: TestAccECSService_ServiceRegistries_changes (198.03s)
--- PASS: TestAccECSService_renamedCluster (86.39s)
--- PASS: TestAccECSService_LaunchTypeFargate_updateWaitForSteadyState (202.46s)
--- PASS: TestAccECSService_DeploymentValues_basic (75.71s)
--- PASS: TestAccECSService_loadBalancerChanges (114.11s)
--- PASS: TestAccECSService_familyAndRevision (87.13s)
--- PASS: TestAccECSService_iamRole (52.54s)
--- PASS: TestAccECSService_deploymentCircuitBreaker (90.73s)
--- PASS: TestAccECSService_Tags_propagate (213.94s)
--- PASS: TestAccECSService_CapacityProviderStrategy_forceNewDeployment (130.75s)
--- PASS: TestAccECSService_multipleTargetGroups (243.00s)
--- PASS: TestAccECSService_basic (72.12s)
--- PASS: TestAccECSService_PlacementStrategy_unnormalized (90.17s)
--- PASS: TestAccECSService_disappears (74.01s)
--- PASS: TestAccECSService_CapacityProviderStrategy_multiple (124.63s)
--- PASS: TestAccECSService_basicImport (94.98s)
--- PASS: TestAccECSService_healthCheckGracePeriodSeconds (294.69s)
--- PASS: TestAccECSService_alb (237.42s)
--- PASS: TestAccECSService_CapacityProviderStrategy_basic (192.52s)
--- PASS: TestAccECSService_CapacityProviderStrategy_update (192.40s)
--- PASS: TestAccECSService_DeploymentControllerType_codeDeploy (234.80s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ecs 379.491s
This functionality has been released in v3.67.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! |
Ran into an issue with v3.67 when managing ecs_service resource with capacity_provider. Don't see any other changes to ecs_service resource except this PR. Downgrading to v.3.66 seems to solve the issue.
|
I'm also seeing potential issue, running a newer version of the provider hashicorp/aws v3.73.0: Terraform Plan: # module.my_service.aws_ecs_service.ecs_service must be replaced
+/- resource "aws_ecs_service" "ecs_service" {
cluster = "arn:aws:ecs:us-west-1:***:cluster/ecs-related-tapir"
deployment_maximum_percent = 200
deployment_minimum_healthy_percent = 100
desired_count = 2
enable_ecs_managed_tags = false
enable_execute_command = false
health_check_grace_period_seconds = 120
~ iam_role = "aws-service-role" -> (known after apply)
~ id = "arn:aws:ecs:us-west-1:***:service/my-cluster/my-service-5e" -> (known after apply)
~ launch_type = "EC2" -> (known after apply)
name = "my-service-service-5e"
+ platform_version = (known after apply)
- propagate_tags = "NONE" -> null
scheduling_strategy = "REPLICA"
- tags = {} -> null
~ tags_all = {} -> (known after apply)
~ task_definition = "arn:aws:ecs:us-west-1:***:task-definition/my-service-:23" -> "arn:aws:ecs:us-west-1:***:task-definition/my-service:1"
wait_for_steady_state = false
+ capacity_provider_strategy { # forces replacement
+ base = 0
+ capacity_provider = "ecs-capacity-provider-related-tapir"
+ weight = 100
}
deployment_controller {
type = "CODE_DEPLOY"
}
load_balancer {
container_name = "my-service"
container_port = 7171
target_group_arn = "arn:aws:elasticloadbalancing:us-west-1:***:targetgroup/abcdef/abcdef"
}
}
Plan: 1 to add, 0 to change, 1 to destroy. Terraform Apply error: Error: error creating ECS service (my-service): InvalidParameterException: Creation of service was not idempotent. |
@spatel96 Can you right up an issue? It needs to be marked as a regression. |
I've raised the following issue: Will add more context when possible. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Closes #11351
Original PR #16402 thanks to @m13t
Output from acceptance testing: