Attini simplified syntax lets you define your deployment plan using a
List instead of Amazon state language. The steps will be executed in
the order of the list.
In addition to a simple list of States, the simplified syntax also supports Parallel and Choice.
DeploymentPlan: - Name: String Type: String # Optional configuration based on State Type
Name of the State. This has to be unique within the deployment plan.
Parallel and Choice are supported but have their own simplified syntax.
DeploymentPlan: - Name: ManualApproval Type: AttiniManualApproval - Name: MyDatabaseStack Type: AttiniCfn Properties: StackName: database Template: /database.yaml
This is a simplified syntax for the Parallel State.
The Parallel State outputs a list of the outputs from all its branches, therefore, it’s often desirable to use the AttiniMergeOutput Type after the Parallel State. This is done automatically when using the simplified syntax, assuming that the merge step has not been added manually.
DeploymentPlan: - Name: String Type: Parallel Branches: - Name: String Type: String
DeploymentPlan: - Name: MyParallelName Type: Parallel Branches: - - Name: Step_1_in_branch_1 Type: AttiniLambdaInvoke Parameters: FunctionName: my-function - Name: Step_2_in_branch_1 Type: AttiniSam Properties: Project: Path: /my-sam-app/ StackName: my-sam-stack - - Name: Step_1_in_branch_2 Type: AttiniRunnerJob Commands: - echo "hello world"
The Choice step will help you make choices depending on a condition. The condition can be based on data in the payload or CloudFormation configuration.
The simplified Choice differs from Amazon state language choice because the simplified syntax only allows for one comparison, while Amazon state language choice can have multiple.
DeploymentPlan: - Name: String Type: Choice Condition: Comparison IsTrue: - List<State> IsFalse: - List<State>
Comparison is a direct translation for
Amazon state language choice
but without “Next”.
A List of States that will be executed if the Condition is true.
A List of States that will be executed if the Condition is false.
If IsFalse is omitted, the deployment will continue to the next step if the Condition is false (or end if it is the last step).
DeploymentPlan: - Name: IsDev? Type: Choice Condition: Variable: $.deploymentOriginData.environment StringEquals: dev IsTrue: - Name: RunLoadtest Type: AttiniRunnerJob Commands: - autocannon --amount 100 --connections 1 --connectionRate 10 --renderStatusCodes --bailout 1 https://my-site.com