-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resource implementations for AWS::CloudFormation::ResourceVersion and AWS::CloudFormation::ResourceDefaultVersion #4
Merged
rjlohan
merged 33 commits into
aws-cloudformation:master
from
rjlohan:aws-cloudformation-type
Aug 4, 2020
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
0ec5fd3
First pass at a proposed resource schema for AWS::CloudFormation::Type
5e2c50c
Refactors initial proposal into 2 discrete types
69c0da9
Updated buildspec with additional type
b96ed45
Bug fix in CREATE path
be9473d
Basic CRDL working
71009a0
Remove pre-existence check from CreateHandler
545e1ab
CRUDL implemented
8dfa833
Minor fixes to AWS::CloudFormation::TypeVersion
3ebf8ea
Fixed schema details
dc9f5d9
Converting build to Travis
96b55d5
Fixing python version
2d3f5fb
Cleanup
ef2e9e2
Adding build badge
7146ca7
Renamed types
97bfb89
Added unit test coverage
66a1abb
Removed repository information to fix http failures
85a3fb2
Incorporated required CloudFormation SDK Update
34597dd
Reverted to public Java Plugin dependency
3223bdc
Converted to CallChain pattern
0c76f63
Reworked CallChain implementation and tests
edc7cf3
Increased cove coverage metric
32902c4
Implemented AWS::CloudFormation::ResourceDefaultVersion
105013b
Fixed existing files for pre-commit changes
5d8c664
Removed commented out block
bb9b08d
Fixed RegEx error
ab6cc38
Upgrading to v2.0.0 plugin
e13eb3e
Various bug fixes - type now works.
c2c6838
Fixing Java Plugin dependency to 2.0.1
a4538a4
Extending SAM Local timeout
44b576e
Fixing DeleteHandler implementation to not return model
2f5d1cc
Fixed dependency version
ab01ee9
Fixing dependency
b537187
Updated AWS::CloudFormation::ResourceDefaultVersion
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# macOS | ||
.DS_Store | ||
._* | ||
|
||
# Maven outputs | ||
.classpath | ||
|
||
# IntelliJ | ||
*.iml | ||
.idea | ||
out.java | ||
out/ | ||
.settings | ||
.project | ||
|
||
# auto-generated files | ||
target/ | ||
|
||
# our logs | ||
rpdk.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"typeName": "AWS::CloudFormation::ResourceDefaultVersion", | ||
"language": "java", | ||
"runtime": "java8", | ||
"entrypoint": "software.amazon.cloudformation.resourcedefaultversion.HandlerWrapper::handleRequest", | ||
"testEntrypoint": "software.amazon.cloudformation.resourcedefaultversion.HandlerWrapper::testEntrypoint", | ||
"settings": { | ||
"namespace": [ | ||
"software", | ||
"amazon", | ||
"cloudformation", | ||
"resourcedefaultversion" | ||
], | ||
"codegen_template_path": "guided_aws", | ||
"protocolVersion": "2.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# AWS::CloudFormation::ResourceDefaultVersion | ||
|
||
|
||
## Sample Usage | ||
|
||
``` | ||
Resources: | ||
InitialType: | ||
Type: AWS::CloudFormation::ResourceVersion | ||
Properties: | ||
TypeName: Sample::CloudFormation::Resource | ||
SchemaHandlerPackage: s3://cloudformationmanageduploadinfrast-artifactbucket-123456789012abcdef/sample-cloudformation-resource.zip | ||
UpdatedType: | ||
Type: AWS::CloudFormation::ResourceVersion | ||
Properties: | ||
TypeName: Sample::CloudFormation::Resource | ||
SchemaHandlerPackage: s3://cloudformationmanageduploadinfrast-artifactbucket-123456789012abcdef/sample-cloudformation-resource-update.zip | ||
DependsOn: InitialType | ||
|
||
DefaultVersion: | ||
Type: AWS::CloudFormation::ResourceDefaultVersion | ||
Properties: | ||
Arn: !Ref UpdatedType | ||
``` |
61 changes: 61 additions & 0 deletions
61
aws-cloudformation-resourcedefaultversion/aws-cloudformation-resourcedefaultversion.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"typeName": "AWS::CloudFormation::ResourceDefaultVersion", | ||
"description": "The default version of a resource that has been registered in the CloudFormation Registry.", | ||
"sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-cloudformation", | ||
"properties": { | ||
"Arn": { | ||
"description": "The Amazon Resource Name (ARN) of the type version.", | ||
"pattern": "^arn:aws[A-Za-z0-9-]{0,64}:cloudformation:[A-Za-z0-9-]{1,64}:([0-9]{12})?:type/resource/.+$", | ||
"type": "string" | ||
}, | ||
"TypeName": { | ||
"description": "The name of the type being registered.\n\nWe recommend that type names adhere to the following pattern: company_or_organization::service::type.", | ||
"pattern": "^[A-Za-z0-9]{2,64}::[A-Za-z0-9]{2,64}::[A-Za-z0-9]{2,64}$", | ||
"type": "string" | ||
}, | ||
"VersionId": { | ||
"description": "The ID of an existing version of the resource to set as the default.", | ||
"pattern": "^[A-Za-z0-9-]{1,128}$", | ||
"type": "string" | ||
} | ||
}, | ||
"oneOf": [ | ||
{ | ||
"required": [ | ||
"Arn" | ||
] | ||
}, | ||
{ | ||
"required": [ | ||
"TypeName", | ||
"VersionId" | ||
] | ||
} | ||
], | ||
"primaryIdentifier": [ | ||
"/properties/Arn" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so this is provided by customers? |
||
], | ||
"handlers": { | ||
"create": { | ||
"permissions": [ | ||
"cloudformation:SetTypeDefaultVersion" | ||
] | ||
}, | ||
"read": { | ||
"permissions": [ | ||
"cloudformation:DescribeType" | ||
] | ||
}, | ||
"update": { | ||
"permissions": [ | ||
"cloudformation:SetTypeDefaultVersion" | ||
] | ||
}, | ||
"delete": { | ||
"permissions": [ | ||
"" | ||
] | ||
} | ||
}, | ||
"additionalProperties": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# AWS::CloudFormation::ResourceDefaultVersion | ||
|
||
The default version of a resource that has been registered in the CloudFormation Registry. | ||
|
||
## Syntax | ||
|
||
To declare this entity in your AWS CloudFormation template, use the following syntax: | ||
|
||
### JSON | ||
|
||
<pre> | ||
{ | ||
"Type" : "AWS::CloudFormation::ResourceDefaultVersion", | ||
"Properties" : { | ||
"<a href="#arn" title="Arn">Arn</a>" : <i>String</i>, | ||
"<a href="#typename" title="TypeName">TypeName</a>" : <i>String</i>, | ||
"<a href="#versionid" title="VersionId">VersionId</a>" : <i>String</i> | ||
} | ||
} | ||
</pre> | ||
|
||
### YAML | ||
|
||
<pre> | ||
Type: AWS::CloudFormation::ResourceDefaultVersion | ||
Properties: | ||
<a href="#arn" title="Arn">Arn</a>: <i>String</i> | ||
<a href="#typename" title="TypeName">TypeName</a>: <i>String</i> | ||
<a href="#versionid" title="VersionId">VersionId</a>: <i>String</i> | ||
</pre> | ||
|
||
## Properties | ||
|
||
#### Arn | ||
|
||
The Amazon Resource Name (ARN) of the type version. | ||
|
||
_Required_: No | ||
|
||
_Type_: String | ||
|
||
_Pattern_: <code>^arn:aws[A-Za-z0-9-]{0,64}:cloudformation:[A-Za-z0-9-]{1,64}:([0-9]{12})?:type/resource/.+$</code> | ||
|
||
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) | ||
|
||
#### TypeName | ||
|
||
The name of the type being registered. | ||
|
||
We recommend that type names adhere to the following pattern: company_or_organization::service::type. | ||
|
||
_Required_: No | ||
|
||
_Type_: String | ||
|
||
_Pattern_: <code>^[A-Za-z0-9]{2,64}::[A-Za-z0-9]{2,64}::[A-Za-z0-9]{2,64}$</code> | ||
|
||
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) | ||
|
||
#### VersionId | ||
|
||
The ID of an existing version of the resource to set as the default. | ||
|
||
_Required_: No | ||
|
||
_Type_: String | ||
|
||
_Pattern_: <code>^[A-Za-z0-9-]{1,128}$</code> | ||
|
||
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt) | ||
|
||
## Return Values | ||
|
||
### Ref | ||
|
||
When you pass the logical ID of this resource to the intrinsic `Ref` function, Ref returns the Arn. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lombok.addLombokGeneratedAnnotation = true |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we have something like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/aws-cloudformation/devtools/pull/11(this is for CodeBuild)