michaelklishin / cassandra-chef-cookbook

Chef cookbook for Apache Cassandra, DataStax Enterprise (DSE) and DataStax agent

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cloudformation::Opsworks support for CustomJson

vsudilov opened this issue · comments

Defining an Opswork stack is convenient to do using cloudformation. Unfortunately, any custom attributes passed from Cloudformation to Opsworks will be cast to string, as per http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworks-stack.html#cfn-opsworks-stack-custjson:

Important

AWS CloudFormation submits all JSON attributes as strings, including any Boolean or number attributes. If you have recipes that expect booleans or numbers, you must modify the recipes to accept strings and to interpret those strings as booleans or numbers.

Would it make sense for this project to do some type checking on attributes? Admittedly this is a bit of an unfortunate thing to support, but maybe the use case justifies it? Any other thoughts for dealing with this issue?

By "do some type checking" do you mean "support every parameter value to also be a string"? That sounds like a never ending maintenance pain.

Yeah, understood. It seems the most straightforward solution for me is to fork and brute force that myself. Was hoping you'd have another idea.

@vsudilov here's (some) hope that OpsWorks will address this issue on their end :/