mirror of https://github.com/pulumi/pulumi.git
e9021ba52e
12499: refactor(cmd/stack init): Turn into a command struct r=abhinav a=abhinav This refactors the `pulumi stack init` command implementation in the same vein as #12400 and #11951. In short, this moves flags and global dependencies are moved to a stackInitCmd struct, and the command implementation into a Run method on that struct. Doing so allows direct testing of the command implementation. As demonstration, this includes a variant of the "--teams is not supported" test directly against the command. This test needed a mock StackReference, so this PR also adds one to the pkg/backend package. This PR contains no behavior changes for the 'stack init' command. However, this does move the default value of the --secrets-provider flag into the Run method instead of being applied by Cobra. Co-authored-by: Abhinav Gupta <abhinav@pulumi.com> |
||
---|---|---|
.. | ||
authhelpers | ||
backend | ||
cmd/pulumi | ||
codegen | ||
engine | ||
graph | ||
importer | ||
operations | ||
resource | ||
secrets | ||
testing/integration | ||
util | ||
version | ||
README.md | ||
go.mod | ||
go.sum |
README.md
pulumi/pkg
While pulumi/sdk maintains strict backwards compatibility guarantees, code under pkg/ is handled more informally: while breaking changes are still discouraged they may happen when they make sense.