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
When a deserialized input template has a property that is a ResourceValue::Object containing a nested TypeReference::Union, the resource translation will fail because it is currently unimplemented -
The Events property is an event source that must contain one of the following event types: AlexaSkill, Api, CloudWatchEvent, CloudWatchLogs, Cognito, DocumentDB, DynamoDB, EventBridgeRule, HttpApi, IoTRule, Kinesis, MQ, MSK, S3, Schedule, ScheduleV2, SelfManagedKafka, SNS, SQS - https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-function-eventsource.html. As a result, the corresponding type is a TypeReference::Union(TypeUnion::Static([TypeReference::Named(_), ..])) which translates to meaning that the event type value must be one of the event types listed above.
We should add support for the TypeReference::Union type. This could be supported via a UnionOf struct similar to the MapOf struct used for the TypeReference::Map type. Further, we need to consider how we could collapse the union type down to a specific TypeReference::Named type based on the specific value detected.
The text was updated successfully, but these errors were encountered:
When a deserialized input template has a property that is a
ResourceValue::Object
containing a nestedTypeReference::Union
, the resource translation will fail because it is currently unimplemented -cdk-from-cfn/src/ir/resources/mod.rs
Line 133 in fd3ec9e
As an example, consider the following template:
The
Events
property is an event source that must contain one of the following event types: AlexaSkill, Api, CloudWatchEvent, CloudWatchLogs, Cognito, DocumentDB, DynamoDB, EventBridgeRule, HttpApi, IoTRule, Kinesis, MQ, MSK, S3, Schedule, ScheduleV2, SelfManagedKafka, SNS, SQS - https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-function-eventsource.html. As a result, the corresponding type is aTypeReference::Union(TypeUnion::Static([TypeReference::Named(_), ..]))
which translates to meaning that the event type value must be one of the event types listed above.We should add support for the
TypeReference::Union
type. This could be supported via aUnionOf
struct similar to theMapOf
struct used for theTypeReference::Map
type. Further, we need to consider how we could collapse the union type down to a specificTypeReference::Named
type based on the specific value detected.The text was updated successfully, but these errors were encountered: