create_config
Create an immutable config object for Docker Swarm to store non-sensitive configuration files like nginx.conf, mounted 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 create_secret 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 remove_config.
args: name - Unique config name within the swarm data - Raw bytes content of the config file labels - Labels to apply to the config object templating - Templating driver config (e.g. {"Name": "golang"} for Go template syntax) returns: dict - The created config's attrs including its id
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| name | Yes | ||
| labels | No | ||
| templating | No |