Add interactive cloud credential selection on stacker deploy --target cloud#129
Merged
Add interactive cloud credential selection on stacker deploy --target cloud#129
stacker deploy --target cloud#129Conversation
…gured cloud provider Co-authored-by: vsilent <42473+vsilent@users.noreply.github.com>
Co-authored-by: vsilent <42473+vsilent@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add feature to select cloud provider for stacker
Add interactive cloud credential selection on Mar 9, 2026
stacker deploy --target cloud
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When deploying to cloud without
deploy.cloudconfigured instacker.yml, the CLI immediately errored withCloudProviderMissing. Users who have saved cloud credentials expected to be able to pick one interactively rather than manually editing the config first.Changes
cloud_provider_from_code()— maps provider strings (short codeshtz/do/lo/vuand full names) toCloudProviderenum; returns an error on unrecognised codes instead of silently defaulting to Hetznerprompt_select_cloud()— fetches saved credentials from the Stacker server and presents adialoguer::Selectmenu:ID NAME (provider)→ Connect a new cloud providerexport TOKEN=...guidance and returnsCloudProviderMissingrun_deploy()step 3b — inserted between credential verification and strategy validation; when cloud target is active andconfig.deploy.cloudisNone, invokesprompt_select_cloud():config.deploy.cloudwith the chosen provider andkey = credential_name, then writes the result back tostacker.ymlso subsequent deploys skip the prompttest_cloud_provider_from_codecovers all short codes, full names, case-insensitivity, and unknown inputsWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
api.openai.com/home/REDACTED/work/stacker/stacker/target/debug/deps/stacker-9dc50868c97bc7f2 /home/REDACTED/work/stacker/stacker/target/debug/deps/stacker-9dc50868c97bc7f2 --color=always --test-threads=1 --nocapture 64-u�� 64-REDACTED-linux-gnu/lib/libminiz_oxide-ec844042f1e20091.rlib 64-REDACTED-linux-gnu/lib/libadler2-fa28e789c10e1e7f.rlib known-linux-gnu/-m zstd/lib/common -incompat pointer ilder_macro-dc06-dynamic-linker o -I 8c2be6c3d4e74645/build_script_build-8c2be6c3d4e74645.build_script_build.bc56fac7f4032739-cgu.0.r--norc 8c2be6c3d4e74645/build_script_build-8c2be6c3d4e74645.7jugm4gpz82prrw1256or3rph.rcgu.o zstd/lib/common -incompat lib/rustlib/x86_--noprofile lib/rustlib/x86_64-REDACTED-linux-gnu/lib/libpanic_unwind-35a18a1986ed2694.rlib(dns block)/home/REDACTED/work/stacker/stacker/target/debug/deps/stacker-9dc50868c97bc7f2 /home/REDACTED/work/stacker/stacker/target/debug/deps/stacker-9dc50868c97bc7f2 --color=always --test-threads=1 --nocapture ITY=�� ons d0d2a6f29259bc1/build_script_build-5d0d2a6f29259bc1.build_script_build.11b0c152aa949fae-cgu.0.rc--norc d0d2a6f29259bc1/build_script_build-5d0d2a6f29259bc1.7nrlmqb89i1v9xf1yorsuounq.rcgu.o zstd/lib/common -incompat lib/rustlib/x86_-t lib/rustlib/x86_security lib/�� lib/rustlib/x86_OUTPUT lib/rustlib/x86_-d lib/rustlib/x86_168.63.129.16 lib/rustlib/x86_bash f4032739-cgu.0.r--norc cgu.o lib/rustlib/x86_owner(dns block)/home/REDACTED/work/stacker/stacker/target/debug/deps/stacker-9dc50868c97bc7f2 /home/REDACTED/work/stacker/stacker/target/debug/deps/stacker-9dc50868c97bc7f2 --color=always --test-threads=1 known-linux-gnu/embed-bitcode=no rcgu�� rcgu.o rcgu.o known-linux-gnu/cfg(docsrs,test) rcgu.o e5b306a3-cgu.0.r-20 cgu.o known-linux-gnu/metadata=a59f0f1d13a0069b k/st�� ons k/stacker/stacker/target/debug/b/home/REDACTED/work/stacker/stacker/target/debug/deps/serde_valid_--norc -1949cf8c6b5b557f/reqwest-0.11.27/src/lib.rs -g -incompat ntained/cc stable-x86_64-REDACTED-linux-gnu/--edition=2021(dns block)stackerdb/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/rustc /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/rustc --crate-name stacker --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg feature="default" --cfg feature="indexmap" --check-cfg cfg(docsrs,test)(dns block)/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/rustc /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/rustc --crate-name stacker --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 --cfg feature="default" --cfg feature="indexmap" --check-cfg cfg(docsrs,test)(dns block)/home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/rustc /home/REDACTED/.rustup/toolchains/stable-x86_64-REDACTED-linux-gnu/bin/rustc --crate-name stacker --edition=2021 src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --test --cfg feature="default" --cfg feature="indexmap" --check-cfg cfg(docsrs,test) --check-cfg(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Start implementation
[Chronological Review: The conversation began with the user requesting a feature for the stacker tool that allows users to select from an existing list of cloud providers and add the selected provider to the stacker.yml file for deployment. The user provided examples of command-line interactions with stacker, highlighting errors encountered when trying to deploy without specifying a cloud provider. The user then expressed their expectations for the feature, detailing how they would like the interaction to flow, including connecting a new cloud provider and updating the stacker.yml file. The user subsequently requested to start the implementation of this feature.][Intent Mapping:
[Technical Inventory:
[Code Archaeology: No specific files or code changes were discussed in detail yet, but the user indicated that the stacker.yml file will need to be modified to include cloud provider configurations.]
[Progress Assessment:
[Context Validation: All necessary context for continuing the implementation of the cloud provider selection feature is captured, including user expectations and the need to modify stacker.yml.]
[Recent Commands Analysis:
./stacker deploy --target cloud --key htz-10,./stacker list cloud, and./stacker list clouds../stacker list cloudssuccessfully returned a list of cloud credentials, indicating that the user has one cloud credential (htz-10) available for use.1. Conversation Overview: - Primary Objectives: User wants to enhance stacker to allow selection from existing cloud providers and automatic configuration of stacker.yml. User expects to see a user-friendly interface for connecting new cloud providers. - Session Context: The conversation flowed from identifying the need for a feature in stacker to outlining specific user expectations and requesting implementation. - User Intent Evolution: The user started with a feature request, detailed their expectations, and concluded with a request to start implementation.- Technical Foundation:
- Tool: stacker - A command-line tool for managing cloud deployments.
- Configuration File: stacker.yml - Needs to be updated with cloud provider information.
- Codebase Status:
- No specific files or code changes have been discussed yet, but the stacker.yml file is central to the upcoming implementation.
- Problem Resolution:
- Issues Encountered: User faced errors related to cloud provider configuration and unrecognized commands.
- Solutions Implemented: None yet, as the implementation has just been requested.
- Debugging Context: User's commands highlighted the need for improved error handling and user guidance in stacker.
- Lessons Learned: User expects seamless integration of cloud provider selection into the deployment process.
- Progress Tracking:
- Completed Tasks: User has articulated feature requirements.
- Partially Complete Work: Implementation of the feature is pending.
- Validated Outcomes: User has confirmed the need for cloud provider configuration in stacker.yml.
- Active Work State:
- Current Focus: User is focused on implementing the feature for cloud provider selection and configuration.
- Recent Context: User provided examples of stacker command usage and outlined expectations for the new feature.
- Working Code: No specific code ...
Created from VS Code.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.