-
Notifications
You must be signed in to change notification settings - Fork 4k
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
aws-ecs: FargateServiceProps Missing Field forceNewDeployment
?
#27762
Comments
@saidkharboutli Can you add a source on where you found the property |
@daschaa Upon further investigation, you do seem to be right--it's only a property in Terraform, and it's under another name (not camelCase). Though regardless of its availability in CDK/Terraform now, if it's an option available in the AWS console, should we not be able to set it programmatically? There may be a reason it's not available, but it would be useful for the many people that have posted about this exact issue. |
@saidkharboutli I totally agree with you that the goal should be to cover the functionalities which you also have in the AWS console. However, if the field is not available in CloudFormation, we need to wait until CloudFormation implemented this. I would suggest to put a flag |
Thanks @saidkharboutli for reporting this. It is not supported by cloudformation yet. However one can submit a FR for this to be added on the Cloudformation coverage roadmap. |
I'm adding the reference for the FR on CFN-github repo here: aws-cloudformation/cloudformation-coverage-roadmap#1776 - Please up-vote this linked issue, to make CFN team aware of this. |
Describe the bug
Hello,
I just noticed that my CDK script has been doing every step of my NodeJS backend deployment except for restarting my ECS service upon ECR image update. There seems to be numerous threads on this specific issue, and the common answer is to use
forceNewDeployment
, which can be set from the CLI as well as within the Fargate service definition.Currently, I am able to go into the AWS dashboard and manually check
forceNewDeployment
but that isn't the programmatic solution I am looking for. Also, once AWS spins up the new service and removes the old one, I have to check the option again for the next deployment.The real underlying issue is that, for some reason, the FargateServiceProps interface has no mention of this specific option. I am really not sure why, given that this issue of updating the ECS service after an ECR update is pretty wide-spread.
Expected Behavior
I should be able to set the
forceNewDeployment
to true for the service when it is first built and thereafter. I really just want the ECS service to restart without downtime when the ECR image updates. If there is another way to do this that I have missed, please do let me know.Current Behavior
forceNewDeployment
is not included as an option when creating an ECS service with CDK. Even checking it manually in the console does not stick, as the current service will spin down after the new one (that has the option set to False by default) is spun up.Reproduction Steps
Not certain if there are reproduction steps--it moreso a lack of an important field within the service definition.
Possible Solution
Allow
forceNewDeployment
to be set to true for the creation of every service, forcing new ECS services to take the place of old ones when a new image is pushed to ECR.Additional Information/Context
No response
CDK CLI Version
2.103.1
Framework Version
No response
Node.js Version
20.9.0
OS
Ubuntu
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: