You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
LaunchTemplateDataProperty/CfnLaunchTemplate_ fails with any complex property set
Works in 0.28
To Reproduce
Add the following to the C# HelloStack of the init app with language csharp
var launchTemplateData = new LaunchTemplateDataProperty
{
InstanceType = "t3.medium",
Monitoring = new MonitoringProperty { Enabled = true }
};
var cfnLaunchTemplate = new CfnLaunchTemplate_(this, "template", new CfnLaunchTemplateProps
{
LaunchTemplateData = launchTemplateData,
LaunchTemplateName = "template"
});
And then run the app
Build works fine
Removing the Monitoring = new MonitoringProperty { Enabled = true } makes the app able to run
Exception message from the app:
Amazon.JSII.Runtime.JsiiException: While synthesizing test-stack/template: System.ArgumentException: Could not convert value 'System.Collections.Generic.Dictionary`2[System.String,System.Object]' with unrecognized type
Parameter name: value
at Amazon.JSII.Runtime.Services.Converters.ValueConverter.ConvertAny(IReferenceMap referenceMap, Object value)
at Amazon.JSII.Runtime.Services.Converters.ValueConverter.TryConvertPrimitive(IReferenceMap referenceMap, Object value, Boolean isOptional, PrimitiveType primitiveType, Object& result)
at Amazon.JSII.Runtime.Services.Converters.ValueConverter.TryConvert(IOptionalValue optionalValue, IReferenceMap referenceMap, Object value, Object& result)
at Amazon.JSII.Runtime.Services.Converters.FrameworkToJsiiConverter.TryConvertMap(IReferenceMap referenceMap, TypeReference elementType, Object value, Object& result)
at Amazon.JSII.Runtime.Services.Converters.ValueConverter.TryConvert(IOptionalValue optionalValue, IReferenceMap referenceMap, Object value, Object& result)
at Amazon.JSII.Runtime.CallbackExtensions.InvokeCallback(Callback callback, IReferenceMap referenceMap, IFrameworkToJsiiConverter converter, String& error)
at Amazon.JSII.Runtime.Services.Client.TryDeserialize[TResponse](String responseJson)
at Amazon.JSII.Runtime.Services.Client.ReceiveResponse[TResponse]()
at Amazon.JSII.Runtime.Services.Client.TryDeserialize[TResponse](String responseJson)
at Amazon.JSII.Runtime.Services.Client.ReceiveResponse[TResponse]()
at Amazon.JSII.Runtime.Deputy.DeputyBase.<InvokeMethodCore>g__GetResult|18_0[T](<>c__DisplayClass18_0`1& )
at Amazon.JSII.Runtime.Deputy.DeputyBase.InvokeMethodCore[T](JsiiMethodAttribute methodAttribute, Object[] arguments, Func`3 beginFunc, Func`3 invokeFunc)
at Amazon.JSII.Runtime.Deputy.DeputyBase.InvokeInstanceMethod[T](Object[] arguments, String methodName)
at Amazon.CDK.CfnElement.Prepare()
Expected behavior
The app to run and produce a launch template with all properties set
Version:
OS - Win 10
Programming Language - C#
CDK Version - 0.31
The text was updated successfully, but these errors were encountered:
Describe the bug
LaunchTemplateDataProperty/CfnLaunchTemplate_ fails with any complex property set
Works in 0.28
To Reproduce
Add the following to the C# HelloStack of the init app with language csharp
And then run the app
Build works fine
Removing the
Monitoring = new MonitoringProperty { Enabled = true }
makes the app able to runException message from the app:
Expected behavior
The app to run and produce a launch template with all properties set
Version:
The text was updated successfully, but these errors were encountered: