cfn-test
Simple create/delete functions for managing CloudFormation templates while testing with tape
Usage
Wraps ansychronous create / delete calls in tape test functions so that you can execute them before and after your own tests easily.
var test = ;var cfnTest = 'my-test-project' 'us-east-1';var myCfnTemplate = ; var parameters = SomeParameter: 'someValue'; cfnTeststartmyCfnTemplate parameters; ; cfnTest;
API
var cfnTest = require('cfn-test')(projectName, region)
Configure the cfnTest
object by providing an arbitrary name for your project and the region to run the stack in.
cfnTest.stackName
Returns the name of your test stack.
cfnTest.start(template, parameters)
Start your stack by either providing the template body (as a JavaScript object or a JSON string), or the template's URL on S3. Optionally, provide parameters to pass to your stack.
cfnTest.description
After starting your stack, description
will provide the output from performing a DescribeStacks
operation on your test stack.
cfnTest.delete()
Shuts down your test stack.