pulumi/pkg
bors[bot] 0e6b29168d
Merge #13462
13462: [internal] `pulumi state edit` utility r=dixler a=dixler

<!--- 
Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation.
-->

# Description

Fixes https://github.com/pulumi/pulumi/issues/13088

Adds `pulumi state edit` an experimental utility for manually editing
pulumi stack state. The command mimics the `git commit` flow by opening
the stack's state in the text editor specified by the EDITOR environment
variable and then previews the file to be saved.

Remaining work would be to make sure round-tripping unicode is preserved. There is a TODO comment near the Hidden argument to indicate the work left to be done before un-hiding the command.

## Checklist

- [x] I have run `make tidy` to update any new dependencies
- [x] I have run `make lint` to verify my code passes the lint check
  - [x] I have formatted my code using `gofumpt`

<!--- Please provide details if the checkbox below is to be left unchecked. -->
- [x] I have added tests that prove my fix is effective or that my feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud,
then the service should honor older versions of the CLI where this change would not exist.
You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version
  <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. -->


Co-authored-by: Kyle Dixler <kyle@pulumi.com>
2023-07-17 18:04:41 +00:00
..
authhelpers make linter happy 2023-02-08 10:30:10 -08:00
backend [engine] Add support for source positions 2023-07-10 14:35:40 -07:00
cmd/pulumi Add `pulumi state edit` utility. 2023-07-17 09:47:05 -07:00
codegen Propagate SkipRangeTypechecking option down to program components 2023-07-14 19:00:38 +02:00
engine Merge #13480 2023-07-17 16:28:39 +00:00
graph Use slice.Prealloc instead of make([]T, 0, ...) 2023-06-29 11:27:50 +01:00
importer Use slice.Prealloc instead of make([]T, 0, ...) 2023-06-29 11:27:50 +01:00
operations Use slice.Prealloc instead of make([]T, 0, ...) 2023-06-29 11:27:50 +01:00
resource Merge #13480 2023-07-17 16:28:39 +00:00
secrets Use slice.Prealloc instead of make([]T, 0, ...) 2023-06-29 11:27:50 +01:00
testing/integration ci: Track code coverage 2023-06-28 13:30:13 -07:00
util Improve the stack validation error message 2023-06-28 00:48:19 +02:00
version duplicate version to ensure linking is properly handled 2020-03-19 12:49:34 -07:00
workspace Fill in default plugin download URL before looking up version 2023-07-13 23:12:25 +01:00
README.md export codegen tests for internal use (#8928) 2022-02-07 12:10:04 +01:00
go.mod Add `pulumi state edit` utility. 2023-07-17 09:47:05 -07:00
go.sum Add `pulumi state edit` utility. 2023-07-17 09:47:05 -07: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.