salt.modules.boto_cfn

Connection module for Amazon Cloud Formation

2015.5.0 新版功能.

configuration:

This module accepts explicit AWS credentials but can also utilize IAM roles assigned to the instance trough Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no further configuration is necessary. More Information available at:

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html

If IAM roles are not used you need to specify them either in a pillar or in the minion's config file:

cfn.keyid: GKTADJGHEIQSXMKKRBJ08H
cfn.key: askdjghsdfjkghWupUjasdflkdfklgjsdfjajkghs

A region may also be specified in the configuration:

cfn.region: us-east-1
depends:

boto

salt.modules.boto_cfn.create(name, template_body=None, template_url=None, parameters=None, notification_arns=None, disable_rollback=None, timeout_in_minutes=None, capabilities=None, tags=None, on_failure=None, stack_policy_body=None, stack_policy_url=None, region=None, key=None, keyid=None, profile=None)

Create a CFN stack.

CLI example to create a stack:

salt myminion boto_cfn.create mystack template_url='https://s3.amazonaws.com/bucket/template.cft'         region=us-east-1
salt.modules.boto_cfn.delete(name, region=None, key=None, keyid=None, profile=None)

Delete a CFN stack.

CLI example to delete a stack:

salt myminion boto_cfn.delete mystack region=us-east-1
salt.modules.boto_cfn.describe(name, region=None, key=None, keyid=None, profile=None)

Describe a stack.

2015.8.0 新版功能.

CLI example:

salt myminion boto_cfn.describe mystack region=us-east-1
salt.modules.boto_cfn.exists(name, region=None, key=None, keyid=None, profile=None)

Check to see if a stack exists.

CLI example:

salt myminion boto_cfn.exists mystack region=us-east-1
salt.modules.boto_cfn.get_template(name, region=None, key=None, keyid=None, profile=None)

Check to see if attributes are set on a CFN stack.

CLI example:

salt myminion boto_cfn.get_template mystack
salt.modules.boto_cfn.update_stack(name, template_body=None, template_url=None, parameters=None, notification_arns=None, disable_rollback=False, timeout_in_minutes=None, capabilities=None, tags=None, use_previous_template=None, stack_policy_during_update_body=None, stack_policy_during_update_url=None, stack_policy_body=None, stack_policy_url=None, region=None, key=None, keyid=None, profile=None)

Update a CFN stack.

2015.8.0 新版功能.

CLI example to update a stack:

salt myminion boto_cfn.update_stack mystack template_url='https://s3.amazonaws.com/bucket/template.cft'         region=us-east-1
salt.modules.boto_cfn.validate_template(template_body=None, template_url=None, region=None, key=None, keyid=None, profile=None)

Validate cloudformation template

2015.8.0 新版功能.

CLI example:

salt myminion boto_cfn.validate_template mystack-template