Skip to content

Commit e9d2031

Browse files
committed
feat: retain config
update README.md
1 parent 460643a commit e9d2031

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ This is the Serverless Framework plugin for AWS Step Functions.
1111
- [Adding a custom name for a state machine](#adding-a-custom-name-for-a-statemachine)
1212
- [Adding a custom logical id for a stateMachine](#adding-a-custom-logical-id-for-a-statemachine)
1313
- [Depending on another logical id](#depending-on-another-logical-id)
14+
- [Adding retain property for a state machine](#adding-retain-property-for-a-statemachine)
1415
- [CloudWatch Alarms](#cloudwatch-alarms)
1516
- [CloudWatch Notifications](#cloudwatch-notifications)
1617
- [Blue-Green deployments](#blue-green-deployment)
@@ -219,6 +220,17 @@ stepFunctions:
219220
- myOtherDB
220221
- myStream
221222
```
223+
### Adding retain property for a stateMachine
224+
There are some practical cases when you would like to prevent state machine from deletion on stack delete or update. This can be achieved by adding `retain` property to the state machine section.
225+
226+
```yaml
227+
stepFunctions:
228+
stateMachines:
229+
myStateMachine:
230+
retain: true
231+
```
232+
233+
Configuring in such way adds `"DeletionPolicy" : "Retain"` to the state machine within CloudFormation template.
222234
223235
### CloudWatch Alarms
224236

0 commit comments

Comments
 (0)