-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
aws-stepfunctions: CDK doesn't realize that it has to destroy the StateMachine
if StateMachineType
changes
#30709
Comments
Hi @garysassano , thanks for reaching out. IMO, as its clearly mentioned in the docs that StateMachineType can not be changed, I assume that's an acceptable behavior. AFAIK, Since the StateMachineArn is not mutable, changing the StateMachineType is causing a replacement and hence the error. I am not really sure why you would want to do that. It would be advisable to create a new StateMachine if type is changed. I am not clear on the usecase of changing the type when new one can be created. Could you please clarify? See this as well - |
StateMachineType is a prop of But we need to note:
This means a new StateMachine would be created in replacement of the previous one. One common error is that when you have specified a custom name of the original one, creating a new one with exactly the same name as a replacement of the original one would cause duplication if the resource does not allow you to have duplicate name as the error indicates:
Solution:
Let me know if it works for you. |
Describe the bug
CDK attempts to update the state machine when you switch from
StateMachineType.STANDARD
toStateMachineType.EXPRESS
, which is not allowed. As per the official docs:CDK should instead destroy the state machine and recreate it.
Expected Behavior
StateMachine
to be destroyed and recreated whenStateMachineType
changes.Current Behavior
CDK attempts to update in place the existing
StateMachine
.Reproduction Steps
Deploy a
StateMachine
, change theStateMachineType
and try to deploy it again.Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.145.0
Framework Version
No response
Node.js Version
20.15.0
OS
Ubuntu 22.04.3 LTS
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: