Skip to content

Commit

Permalink
fix: Make pass-through properties pass-through in serverless::function
Browse files Browse the repository at this point in the history
  • Loading branch information
aahung committed Feb 21, 2023
1 parent 2c254db commit fc5fa5e
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions samtranslator/model/sam_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,17 @@ class SamFunction(SamResourceMacro):
resource_type = "AWS::Serverless::Function"
property_types = {
"FunctionName": PropertyType(False, one_of(IS_STR, IS_DICT)),
"Handler": PropertyType(False, IS_STR),
"Runtime": PropertyType(False, IS_STR),
"CodeUri": PropertyType(False, one_of(IS_STR, IS_DICT)),
"ImageUri": PropertyType(False, IS_STR),
"PackageType": PropertyType(False, IS_STR),
"InlineCode": PropertyType(False, one_of(IS_STR, IS_DICT)),
"Handler": PassThroughProperty(False),
"Runtime": PassThroughProperty(False),
"CodeUri": PassThroughProperty(False),
"ImageUri": PassThroughProperty(False),
"PackageType": PassThroughProperty(False),
"InlineCode": PassThroughProperty(False),
"DeadLetterQueue": PropertyType(False, IS_DICT),
"Description": PropertyType(False, IS_STR),
"Description": PassThroughProperty(False),
"MemorySize": PassThroughProperty(False),
"Timeout": PropertyType(False, is_type(int)),
"VpcConfig": PropertyType(False, IS_DICT),
"Timeout": PassThroughProperty(False),
"VpcConfig": PassThroughProperty(False),
"Role": PropertyType(False, IS_STR),
"AssumeRolePolicyDocument": PropertyType(False, IS_DICT),
"Policies": PropertyType(False, one_of(IS_STR, IS_DICT, list_of(one_of(IS_STR, IS_DICT)))),
Expand All @@ -116,25 +116,25 @@ class SamFunction(SamResourceMacro):
"Events": PropertyType(False, dict_of(IS_STR, IS_DICT)),
"Tags": PropertyType(False, IS_DICT),
"Tracing": PropertyType(False, one_of(IS_DICT, IS_STR)),
"KmsKeyArn": PropertyType(False, one_of(IS_DICT, IS_STR)),
"KmsKeyArn": PassThroughProperty(False),
"DeploymentPreference": PropertyType(False, IS_DICT),
"ReservedConcurrentExecutions": PropertyType(False, any_type()),
"Layers": PropertyType(False, list_of(one_of(IS_STR, IS_DICT))),
"EventInvokeConfig": PropertyType(False, IS_DICT),
"EphemeralStorage": PropertyType(False, IS_DICT),
"EphemeralStorage": PassThroughProperty(False),
# Intrinsic functions in value of Alias property are not supported, yet
"AutoPublishAlias": PropertyType(False, one_of(IS_STR)),
"AutoPublishCodeSha256": PropertyType(False, one_of(IS_STR)),
"AutoPublishAliasAllProperties": Property(False, is_type(bool)),
"VersionDescription": PropertyType(False, IS_STR),
"ProvisionedConcurrencyConfig": PropertyType(False, IS_DICT),
"FileSystemConfigs": PropertyType(False, list_of(IS_DICT)),
"ImageConfig": PropertyType(False, IS_DICT),
"CodeSigningConfigArn": PropertyType(False, IS_STR),
"Architectures": PropertyType(False, list_of(one_of(IS_STR, IS_DICT))),
"VersionDescription": PassThroughProperty(False),
"ProvisionedConcurrencyConfig": PassThroughProperty(False),
"FileSystemConfigs": PassThroughProperty(False),
"ImageConfig": PassThroughProperty(False),
"CodeSigningConfigArn": PassThroughProperty(False),
"Architectures": PassThroughProperty(False),
"SnapStart": PropertyType(False, IS_DICT),
"FunctionUrlConfig": PropertyType(False, IS_DICT),
"RuntimeManagementConfig": PropertyType(False, IS_DICT),
"RuntimeManagementConfig": PassThroughProperty(False),
}

FunctionName: Optional[Intrinsicable[str]]
Expand Down

0 comments on commit fc5fa5e

Please sign in to comment.