Skip to content

Commit

Permalink
feat: Deprecate an attempt to extend nonexistent resources (#8266)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrzesik committed Sep 18, 2020
1 parent 4bf6543 commit 0ced414
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
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

0 comments on commit 0ced414

Please sign in to comment.