Skip to content

Implement reading apply configuration from stdin #2938

Merged
r4victor merged 3 commits intomasterfrom
issue_2304_dstack_apply_stdin
Aug 1, 2025
Merged

Implement reading apply configuration from stdin #2938
r4victor merged 3 commits intomasterfrom
issue_2304_dstack_apply_stdin

Conversation

@r4victor
Copy link
Copy Markdown
Collaborator

@r4victor r4victor commented Aug 1, 2025

Closes #2304

This PR allows dstack apply to read configurations from stdin instead of files using the syntax dstack apply -y -f -. Configuration files can now be parametrized in arbitrary ways on the client side like this:

type: volume
name: my-vol

backend: aws
region: us-east-1
size: $VOL_SIZE
export VOL_SIZE=50
envsubst '$VOL_SIZE' < .dstack/volume.dstack.yml | dstack apply -y -f -

The -y/--yes flag is currently required for -f - to work.

The PR also fixes a few places where the CLI asked for confirmation even with --yes, e.g. when ctrl+c in dstack apply.

@r4victor r4victor merged commit 5b8ce35 into master Aug 1, 2025
27 checks passed
@r4victor r4victor deleted the issue_2304_dstack_apply_stdin branch August 1, 2025 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Support reading apply configuration from stdin

1 participant