tcb fn layer create
Creates a layer and publishes a version. Layer versions are immutable, publish a new version to update content.
Usage
tcb fn layer create <alias> --file <path> [options]
Flags
| Flag | Required | Description | Default |
|---|---|---|---|
<alias> | Yes | Layer alias | — |
--file <path> | Yes | Directory or ZIP path | — |
--runtime <runtimes> | No | Compatible runtimes, comma separated | Common runtimes |
-e, --env-id <envId> | Yes | Environment ID | — |
Example
# Upload a directory
tcb fn layer create myLayer --file ./node_modules -e my-env-id
# Upload a ZIP file with compatible runtimes
tcb fn layer create commonLib --file ./libs.zip --runtime Nodejs18.15,Nodejs20.19 -e my-env-id
Related commands
- List layers
- Bind a layer: mount the layer to a function