mercredi 15 avril 2015

"Fn::Join" with delimiter from a parameter?

I'm trying to parametise the delimiter used by an Fn::Join, e.g. at first I had:



"Name" : { "Fn::Join" : [ ".", [
{ "Ref":"serviceName"}, { "Ref": "environment" } ] ] },


Which works well, but then I changed it to:



"Name" : { "Fn::Join" : [ {"Ref":"HostNameSeparator"}, [
{ "Ref":"serviceName"}, { "Ref": "environment" } ] ] },


I get the following error from the validation phase:



A client error (ValidationError) occurred when calling the
ValidateTemplate operation: Template error: every Fn::Join object
requires two parameters, (1) a string delimiter and (2) a list of
strings to be joined or a function that returns a list of strings
(such as Fn::GetAZs) to be joined.


Is it possible to do what I want, i.e. pass the Join delimiter as a template parameter?


(I've shortened the examples above for clarity sake, please ignore typos)





Aucun commentaire:

Enregistrer un commentaire