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

chore(aws): add deprecation for extending nonexistent resources #8266

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/deprecations.md
Expand Up @@ -6,6 +6,12 @@ layout: Doc

# Serverless Framework Deprecations

<a name="RESOURCES_EXTENSIONS_REFERENCE_TO_NONEXISTENT_RESOURCE"><div>&nbsp;</div></a>

## Defining extensions to nonexistent resources in `resources.extensions`

Starting with v3.0.0, extensions to nonexistent resources in `resources.extensions` will throw an error instead of passing silently.

<a name="DISABLE_LOCAL_INSTALLATION_FALLBACK_SETTING"><div>&nbsp;</div></a>

## Support for `enableLocalInstallationFallback` setting is to be removed
Expand Down
4 changes: 4 additions & 0 deletions lib/plugins/aws/package/lib/mergeCustomProviderResources.js
Expand Up @@ -31,6 +31,10 @@ module.exports = {
for (const [extensionAttributeName, value] of _.entries(resourceDefinition)) {
if (!template.Resources[resourceName]) {
template.Resources[resourceName] = {};
this.serverless._logDeprecation(
'RESOURCES_EXTENSIONS_REFERENCE_TO_NONEXISTENT_RESOURCE',
'Starting with next major version, extensions to nonexistent resources will throw an error instead of passing silently.'
);
}

switch (extensionAttributeName) {
Expand Down