I'm currently trying to define an EC2 ASG MixedInstancePolicy in my Troposphere script. I have an stack parameter which is a CommaDelimitedList of instance types, which i'd like to use in my MixedInstancePolicy.
However, i'm running into an issue whereby Troposphere requires certain attributes to be a specific class. I can't use raw JSON in certain places.
```
MixedInstancesPolicy={
"LaunchTemplate": {
"LaunchTemplateSpecification": LaunchTemplateSpecification(
LaunchTemplateId=Ref(launch_template),
Version=GetAtt(launch_template, "LatestVersionNumber")
),
"Overrides": {
"Fn::ForEach::InstanceTypes": [
"InstanceType",
Ref(instance_types),
[
LaunchTemplateOverrides(
InstanceType="${InstanceType}",
)
]
]
}
}
}
```
The above results in the below error:
```
TypeError: <class 'troposphere.autoscaling.AutoScalingGroup'>: ComponentAutoScalingGroup.MixedInstancesPolicy is <class 'dict'>, expected <class 'troposphere.autoscaling.MixedInstancesPolicy'>
```
Is there a way to override this requirement? So that I can use a dictionary instead of an expected class to output my required contents?
Many thanks :)