Skip to content

Commit

Permalink
Merge pull request #5568 from ConnorKirk/add-codecommit-repository-to…
Browse files Browse the repository at this point in the history
…-cloudformation-package-command

Add CodeCommit Repository Resource to cloudformation package command
  • Loading branch information
justindho authored Jun 1, 2022
2 parents 9b940e8 + e6f1329 commit eab8942
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
17 changes: 16 additions & 1 deletion awscli/customizations/cloudformation/artifact_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,20 @@ class GlueJobCommandScriptLocationResource(Resource):
PROPERTY_NAME = "Command.ScriptLocation"


class CodeCommitRepositoryS3Resource(ResourceWithS3UrlDict):
"""
Represents CodeCommit::Repository resource.
"""
RESOURCE_TYPE = "AWS::CodeCommit::Repository"
PROPERTY_NAME = "Code.S3"
BUCKET_NAME_PROPERTY = "Bucket"
OBJECT_KEY_PROPERTY = "Key"
VERSION_PROPERTY = "ObjectVersion"
# Don't package the directory if S3 is omitted.
PACKAGE_NULL_PROPERTY = False
FORCE_ZIP = True


RESOURCES_EXPORT_LIST = [
ServerlessFunctionResource,
ServerlessApiResource,
Expand All @@ -523,7 +537,8 @@ class GlueJobCommandScriptLocationResource(Resource):
LambdaLayerVersionResource,
GlueJobCommandScriptLocationResource,
StepFunctionsStateMachineDefinitionResource,
ServerlessStateMachineDefinitionResource
ServerlessStateMachineDefinitionResource,
CodeCommitRepositoryS3Resource
]

METADATA_EXPORT_LIST = [
Expand Down
1 change: 1 addition & 0 deletions awscli/examples/cloudformation/_package_description.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ This command can upload local artifacts referenced in the following places:
- ``Command.ScriptLocation`` property for the ``AWS::Glue::Job`` resource
- ``DefinitionS3Location`` property for the ``AWS::StepFunctions::StateMachine`` resource
- ``DefinitionUri`` property for the ``AWS::Serverless::StateMachine`` resource
- ``S3`` property for the ``AWS::CodeCommit::Repository`` resource


To specify a local artifact in your template, specify a path to a local file or folder,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
AppSyncFunctionConfigurationResponseTemplateResource, \
GlueJobCommandScriptLocationResource, \
StepFunctionsStateMachineDefinitionResource, \
ServerlessStateMachineDefinitionResource
ServerlessStateMachineDefinitionResource, \
CodeCommitRepositoryS3Resource


VALID_CASES = [
Expand Down

0 comments on commit eab8942

Please sign in to comment.