Skip to content
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

Setting ModuleVersion's ModulePackage field to "required" #34

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@
}
},
"required": [
"ModuleName"
"ModuleName",
"ModulePackage"
],
"createOnlyProperties": [
"/properties/ModuleName",
"/properties/ModulePackage"
],
"readOnlyProperties": [
Expand Down
4 changes: 2 additions & 2 deletions aws-cloudformation-moduleversion/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ _Type_: String

_Pattern_: <code>^[A-Za-z0-9]{2,64}::[A-Za-z0-9]{2,64}::[A-Za-z0-9]{2,64}::MODULE</code>

_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

#### ModulePackage

The url to the S3 bucket containing the schema and template fragment for the module you want to register.

_Required_: No
_Required_: Yes

_Type_: String

Expand Down
2 changes: 1 addition & 1 deletion aws-cloudformation-moduleversion/overrides.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"CREATE": {
"/Name": "Your::Personal::Test::MODULE",
"/ModuleName": "Your::Personal::Test::MODULE",
"/ModulePackage": "s3://<your_s3_bucket_name>/<your_module_package_key>"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,4 @@ private Boolean stabilize(
throw new CfnGeneralServiceException(String.format("received unexpected module registration status: %s", dtrResponse.progressStatus()));
}
}

@Override
protected void validateModel(final ResourceModel model) {
if (model == null) {
throw new CfnInvalidRequestException("ResourceModel is required");
}
if (model.getModulePackage() == null) {
throw new CfnInvalidRequestException("ModulePackage is required in ResourceModel");
}
}
}