troposphere
troposphere copied to clipboard
support Fn::ToJsonString
It seems like the new ToJsonString intrinsic function is not yet available in Troposphere: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ToJsonString.html
An example use-case for the function is to be able to use the return value "OpenWireEndpoints" of AWS:AmazonMQ:Broker as an environment variable for an Elastic Beanstalk environment:
OptionSetting(
OptionName="ACTIVE_MQ_ENDPOINTS",
Namespace="aws:elasticbeanstalk:application:environment",
Value=ToJsonString(GetAtt(broker, "OpenWireEndpoints"))
),
At the time of writing, Fn::ToJsonString requires the AWS::LanguageExtensions transform
Unfortunately this CloudFormation feature appears to suffer from a number of bugs, including erroneous validation of conditions
https://github.com/aws-cloudformation/cfn-language-discussion/issues/147