docs: Mention patterns instead of exclude in layers.md (#11090)

This commit is contained in:
John Mee 2022-05-19 01:04:55 +10:00 committed by GitHub
parent f10bc22c70
commit 39152191c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,8 +73,8 @@ provider:
name: aws
package:
exclude:
- layerSourceTarball.tar.gz
patterns:
- '!layerSourceTarball.tar.gz'
layers:
layerOne:
@ -94,11 +94,11 @@ layers:
layerOne:
path: layerOne
package:
exclude:
- layerSourceTarball.tar.gz
patterns:
- '!layerSourceTarball.tar.gz'
```
Keep in mind that all `include` and `exclude` patterns (even when inherited from the service config) are resolved against the layer's `path` and not the service `path`.
Keep in mind that all patterns (even when inherited from the service config) are resolved against the layer's `path` and not the service `path`.
You can also specify a prebuilt archive to create your layer. When you do this, you do not need to specify the `path` element of your layer.