Skip to content

Instantly share code, notes, and snippets.

@pidah
Created March 24, 2016 12:42
Show Gist options
  • Save pidah/2393a02487642d818031 to your computer and use it in GitHub Desktop.
Save pidah/2393a02487642d818031 to your computer and use it in GitHub Desktop.
---
chain:
-
name: "cloudformation_spec"
ref: "kubernetes.cloudformation_spec"
params:
payload: "{{payload}}"
on-success: "create_cloudformation_stack"
-
name: "create_cloudformation_stack"
ref: "aws.cf_create_stack"
params:
stack_name: "{{cloudformation_spec.result.stack_name}}"
template_url: "{{cloudformation_spec.result.template_url}}"
parameters: "{{cloudformation_spec.result.parameters}}"
capabilities:
- "CAPABILITY_IAM"
on-success: "get_stack_events"
-
name: "get_stack_events"
ref: "aws.cf_describe_stack_events"
params:
stack_name_or_id: "{{cloudformation_spec.result.stack_name}}"
on-success: "check_stack_status"
-
name: "check_stack_status"
ref: "core.local"
params:
cmd: "echo '{% if get_stack_events.result[0].resource_status in ['CREATE_COMPLETE', 'CREATE_FAILED', 'ROLLBACK_COMPLETE'] -%} true {%- else -%} false {%- endif %}'"
stack_name_or_id: "{{cloudformation_spec.result.stack_name}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment