tcb config pull
Pull the configuration of deployed resources from the cloud into the local cloudbaserc.json, to sync the cloud state or bootstrap a local configuration.
Usage
tcb config pull <module> [name...] [options]
<module> is the resource module:
| Module | Description |
|---|---|
fn | Pull function configuration |
integration | Pull integration configuration |
Parameters
| Parameter | Required | Description | Default |
|---|---|---|---|
[name...] | No | Resource names, one or more | — |
--all | No | Pull every resource declared in the configuration file | false |
-e, --env-id <envId> | No | Environment ID | — |
-o, --output <output> | No | Output path, relative paths resolve against the current directory | cloudbaserc.json |
--stdout | No | Print to the console instead of writing a file | false |
--code-secret <codeSecret> | No | CodeSecret of a code-encrypted function | — |
--dir <dir> | No | Directory used to infer configuration when the cloud resource is missing | — |
--yes | No | Skip confirmation and overwrite the existing resource with the same name | false |
Examples
# Pull a single function
tcb config pull fn myFunc
# Pull several functions
tcb config pull fn func1 func2 func3
# Pull every function declared in the configuration file
tcb config pull fn --all
# Print to the console instead of writing a file
tcb config pull fn func1 --stdout
# Custom output path, without confirmation
tcb config pull fn --all -o ./config/cloudbaserc.json --yes
# Pull a single integration
tcb config pull integration myPayment
# Pull every integration
tcb config pull integration --all --yes
Behaviour
| Scenario | Behaviour |
|---|---|
| Local configuration missing | Created and filled with the pulled configuration |
| Resource with the same name exists | Asks whether to overwrite, --yes overwrites directly |
| Resource with a different name | Appended to the functions / integrations array |
| Function missing in the cloud | Asks whether to infer the configuration from the local directory, --dir picks the directory |
| Integration missing in the cloud | Fails and suggests creating a template with tcb config init integration |
Password-like integration fields (API keys, certificates) come back as the ****** placeholder and must be filled in manually.
Related Commands
- Push configuration: the opposite direction
- Compare configuration: check the differences after pulling
- Initialise configuration: generate a template