File tree Expand file tree Collapse file tree
customizations/cloudformation
tests/unit/customizations/cloudformation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -496,6 +496,18 @@ class GlueJobCommandScriptLocationResource(Resource):
496496 # Note the PROPERTY_NAME includes a '.' implying it's nested.
497497 PROPERTY_NAME = "Command.ScriptLocation"
498498
499+ class CodeCommitRepositoryS3Resource (ResourceWithS3UrlDict ):
500+ """
501+ Represents CodeCommit::Repository resource.
502+ """
503+ RESOURCE_TYPE = "AWS::CodeCommit::Repository"
504+ PROPERTY_NAME = "Code.S3"
505+ BUCKET_NAME_PROPERTY = "Bucket"
506+ OBJECT_KEY_PROPERTY = "Key"
507+ VERSION_PROPERTY = "ObjectVersion"
508+ # Don't package the directory if S3 is omitted.
509+ PACKAGE_NULL_PROPERTY = False
510+ FORCE_ZIP = True
499511
500512RESOURCES_EXPORT_LIST = [
501513 ServerlessFunctionResource ,
@@ -513,7 +525,8 @@ class GlueJobCommandScriptLocationResource(Resource):
513525 ServerlessLayerVersionResource ,
514526 LambdaLayerVersionResource ,
515527 GlueJobCommandScriptLocationResource ,
516- StepFunctionsStateMachineDefinitionResource
528+ StepFunctionsStateMachineDefinitionResource ,
529+ CodeCommitRepositoryS3Resource
517530]
518531
519532METADATA_EXPORT_LIST = [
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ This command can upload local artifacts referenced in the following places:
2323 - ``TemplateURL `` property for the ``AWS::CloudFormation::Stack `` resource
2424 - ``Command.ScriptLocation `` property for the ``AWS::Glue::Job `` resource
2525 - ``DefinitionS3Location `` property for the ``AWS::StepFunctions::StateMachine `` resource
26+ - ``S3 `` property for the ``AWS::CodeCommit::Repository `` resource
2627
2728
2829To specify a local artifact in your template, specify a path to a local file or folder,
Original file line number Diff line number Diff line change 2828 AppSyncFunctionConfigurationRequestTemplateResource , \
2929 AppSyncFunctionConfigurationResponseTemplateResource , \
3030 GlueJobCommandScriptLocationResource , \
31- StepFunctionsStateMachineDefinitionResource
31+ StepFunctionsStateMachineDefinitionResource , \
32+ CodeCommitRepositoryS3Resource
3233
3334
3435def test_is_s3_url ():
@@ -158,6 +159,16 @@ def test_all_resources_export():
158159 "Bucket" : "foo" , "Key" : "bar" , "Version" : "baz"
159160 }
160161 },
162+ {
163+ "class" : CodeCommitRepositoryS3Resource ,
164+ "expected_result" : {
165+ "S3" : {
166+ "Bucket" : "foo" ,
167+ "Key" : "bar" ,
168+ "ObjectVersion" : "baz"
169+ }
170+ }
171+ },
161172 ]
162173
163174 with patch ("awscli.customizations.cloudformation.artifact_exporter.upload_local_artifacts" ) as upload_local_artifacts_mock :
You can’t perform that action at this time.
0 commit comments