config_create
Create an immutable Docker Swarm config object to store non-sensitive configuration files like nginx.conf or app.yaml for mounting into service containers.
Instructions
Create an immutable Swarm config object; requires a swarm manager.
Configs store non-sensitive configuration files (nginx.conf, app.yaml, etc.) and mount
them into service containers at a specified path. Unlike secrets, config data is not
encrypted at rest - use secret_create for credentials or keys. data is raw bytes;
encode strings first (e.g. "my config".encode()). Once created, a config is immutable:
to update it, create a new config with a new name and update the service to reference it,
then remove the old config with config_remove.
Args: name: Unique config name within the swarm data: Raw bytes content of the config file labels: Labels to set on the config templating: Templating driver config (e.g. {"Name": "golang"} for Go template syntax)
Returns: dict: The created config's full document ({"ID", "Version", "CreatedAt", "Spec", ...})
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| name | Yes | ||
| labels | No | ||
| templating | No |