cityindex/logsearch — pull request #257 by sopel (2013-12-06 02:06:28+00:00)
Title: Increase CloudFormation template versatility

This makes the use of the following features optional (which has previously not been possible, but can be achieved now via the new [Conditions Declaration](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html) and [Condition Functions](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-conditions.html)):

* `AutoScalingTopicArn` - if omitted (default), no notifications will be sent
* `SpotPrice` - if set to 0, on demand instances are created instead
* `ElasticsearchEbsSnapshotId` - if set to snap-00000000 (default), a new volume is created instead

I'm completely happy with the former two, but not 100% sure about the latter (check each separate commit to see the resp. template pattern in isolation):

* . using an empty string for the ARN to communicate 'no notifications' is completely transparent I think
* using `SpotPrice` to communicate 'on demand' is a tiny bit shoe horned, but I think this will be a pretty straight forward choice/pattern for this distinction regardless
* :question: using `snap-00000000` as an indicator for 'create volume instead' is a bit less accessible though; the resulting template pattern, albeit slightly more involved, is still straight forward to handle, but a stack user likely needs to read twice to grasp the conditional dependency between `ElasticsearchEbsSnapshotId` and `ElasticsearchEbsVolumeSize` (resp. `SnapshotId` and `VolumeSize`) - those conditional dependencies are quite common within CloudFormation anyway though.
* For my personal use cases I'll certainly adopt this pattern, because it nicely isolates this choice into a self contained template, so I'm voting for inclusion here as well (no strong vote though, I can certainly live with the status quo right now, i.e. using appropriately sized empty snapshots instead).