pulumi/pkg
bors[bot] 53e927dc08
Merge #11952
11952: cmd/stack output: Inject requireStack and test output r=abhinav a=abhinav

`pulumi stack output`'s core behavior stems from
acquiring the current stack and inspecting its outputs.
To test this logic sufficiently,
we need to be able to inject an alternative stack value.

This change adds a `requireStack` field to stackOutputCmd.
This, if set, specifies an alternative to the requireStack function
that we use to acquire the current stack.

As a demonstration of what this unlocks,
this change also includes tests for
the core functionality of `pulumi stack outputs`:

    print plain and secret outputs
    together or separately
    with and without --json
    with and without --show-secrets

Note that to test the output of the command,
we have to temporarily replace `os.Stdout`.
This is indicative of debt -- there are too many functions
that print to stdout directly intsead of an io.Writer.
That should be reduced in future changes.

Change made in preparation for #2632


Co-authored-by: Abhinav Gupta <abhinav@pulumi.com>
2023-01-25 16:45:16 +00:00
..
authhelpers Add support for authentication via GOOGLE_CREDENTIALS (#6379) 2022-06-07 16:02:08 +01:00
backend Merge #11803 #11893 #11903 #11922 2023-01-19 23:04:19 +00:00
cmd/pulumi cmd/stack output: Inject requireStack and test output 2023-01-24 16:21:39 -08:00
codegen Merge #11937 2023-01-20 22:10:11 +00:00
engine Merge #11819 #11834 #11842 #11845 2023-01-12 20:11:42 +00:00
graph Update error handling (#8406) 2021-11-12 18:37:17 -08:00
operations Merge #11819 #11834 #11842 #11845 2023-01-12 20:11:42 +00:00
resource Add note about SupportsFeature 2023-01-23 14:57:51 +00:00
secrets Replace assertNoError with require.NoError in aws kms tests 2023-01-24 08:28:48 +00:00
testing/integration Use plugin link and shimless for testprovider 2023-01-19 12:41:19 +00:00
util all: Drop ioutil 2023-01-06 16:35:14 -08:00
version duplicate version to ensure linking is properly handled 2020-03-19 12:49:34 -07:00
README.md export codegen tests for internal use (#8928) 2022-02-07 12:10:04 +01:00
go.mod chore: post-release go.mod updates 2023-01-25 11:47:44 +00:00
go.sum chore: Update gocloud.dev, removing azure-sdk-for-go dep 2023-01-24 00:52:43 -08:00

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.