wer apply

Apply a configuration from a file to create or update resources.

Usage

wer apply -f <filename> [filename ...] [flags]

Description

The apply command reads one or more YAML configuration files and creates or updates the resources defined within them. This is the declarative way to manage werkr resources, similar to kubectl apply. Supported resource types include Workstation, WorkstationConfig, and SSHKey.

If a resource with the same name already exists, it will be updated to match the configuration in the file. If it does not exist, it will be created.

Files can contain multiple YAML documents separated by ---. Multiple files can be specified with repeated -f flags or as additional positional arguments. Directories are also supported. Use - to read from stdin.

Flags

Flag Description
-f, --filename Path to a file or directory containing manifests (can be repeated)
--wait Wait for all applied resources to reach their expected status
--wait-timeout Maximum time to wait (e.g., 30s, 5m). 0 means no timeout

Examples

# Apply a workstation from a file
wer apply -f workstation.yaml

# Apply multiple files
wer apply -f workstation.yaml config.yaml
wer apply -f workstation.yaml -f config.yaml

# Apply all manifests in a directory
wer apply -f ./manifests/

# Apply from stdin
cat workstation.yaml | wer apply -f -
wer apply -

# Apply and wait until all workstations are running
wer apply -f workstation.yaml --wait