Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(cli): add --no-build flag to state push for state-only updates#21374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
kacpersaw wants to merge1 commit intomain
base:main
Choose a base branch
Loading
fromkacpersaw/coder-state-no-build-flag

Conversation

@kacpersaw
Copy link
Contributor

Summary

Adds a--no-build flag tocoder state push that updates the Terraform state directly without triggering a workspace build.

Use Case

This enables state-only migrations, such as migrating Kubernetes resources from deprecated types (e.g.,kubernetes_config_map) to versioned types (e.g.,kubernetes_config_map_v1):

coder state pull my-workspace> state.jsonterraform initterraform state rm -state=state.json kubernetes_config_map.exampleterraform import -state=state.json kubernetes_config_map_v1.example default/examplecoder state push --no-build my-workspace state.json

Changes

  • AddPUT /api/v2/workspacebuilds/{id}/state endpoint to update state without triggering a build
  • AddUpdateWorkspaceBuildState SDK method
  • Add--no-build/-n flag tocoder state push
  • Add confirmation prompt (can be skipped with--yes/-y) since this is a potentially dangerous operation
  • Add test for--no-build functionality

Fixes#21336

Adds a --no-build flag to 'coder state push' that updates the Terraformstate directly without triggering a workspace build. This enablesstate-only migrations, such as migrating Kubernetes resources fromdeprecated types to versioned types.Changes:- Add PUT /api/v2/workspacebuilds/{id}/state endpoint- Add UpdateWorkspaceBuildState SDK method- Add --no-build/-n flag to 'coder state push'- Add confirmation prompt with --yes/-y skip option- Add test for --no-build functionalityFixes#21336
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

@kacpersawkacpersaw

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Add--no-build flag tocoder state push for state-only updates

2 participants

@kacpersaw

[8]ページ先頭

©2009-2025 Movatter.jp