pulumi/pkg
Pat Gavlin d1ff268b10 [esc] Add commands for managing stack environments
These changes add three commands for managing a stack's environments:

- `pulumi config env init`, which creates a new environment for a stack
  based on its configuration values
- `pulumi config env add`, which adds environments to a stack's import
  list
- `pulumi config env rm`, which removes an environment from a stack's
  import list

As implied by their paths, these commands hang off of a new sub-command
of `pulumi config`, `pulumi config env`.

From the usage:

* `pulumi config env init`

Creates an environment for a specific stack based on the stack's
configuration values, then replaces the stack's configuration values with
a reference to that environment. The environment will be created in the
same organization as the stack.

* `pulumi config env add`

Adds environments to the end of a stack's import list. Imported
environments are merged in order per the ESC merge rules. The list of
stacks behaves as if it were the import list in an anonymous environment.

* `pulumi config env rm`

Removes an environment from a stack's import list.

Each of these commands previews the new stack environment and shows the
environment definition. These commands print a warning if the stack's
environment does not define any of the `environmentVariables`, `files`,
or `pulumiConfig` properties.

These changes also add an `ENVIRONMENT` block to the output of `pulumi
config` for stacks that reference environments. This block shows the
definition of the stack's environment. In order to improve the
appearence of these tables, these changes also add a helper function
that colorizes the header row.

Finally, these changes add a warning on `pulumi env add`, `pulumi env
rm`, and `pulumi up/refresh/etc.` for stacks that reference environments
that do define any of `environmentVariables`, `files`, or
`pulumiConfig`, and add a tag to update metadata that includes the
environments associated with an update.
2023-11-13 16:38:31 -08:00
..
authhelpers Add tests for gcpauth pkg (#13926) 2023-09-13 11:27:03 +00:00
backend [esc] Add commands for managing stack environments 2023-11-13 16:38:31 -08:00
cmd/pulumi [esc] Add commands for managing stack environments 2023-11-13 16:38:31 -08:00
codegen Replace PropertyValue type casts with method calls (#14538) 2023-11-12 20:10:47 +00:00
display Move sdk/go/common/display to /pkg/display (#13954) 2023-09-18 11:01:28 +00:00
engine Allow `import` to create empty component resources (#14467) 2023-11-13 17:58:35 +00:00
graph Use slice.Prealloc instead of make([]T, 0, ...) 2023-06-29 11:27:50 +01:00
importer Replace PropertyValue type casts with method calls (#14538) 2023-11-12 20:10:47 +00:00
operations PR feedback and CHANGELOG 2023-07-26 20:44:12 -07:00
resource [esc] Add commands for managing stack environments 2023-11-13 16:38:31 -08:00
secrets Restore secrets provider in config refresh (#13900) 2023-11-13 12:27:46 +00:00
testing/integration Switch to use env.Env in filestate (#14044) 2023-10-18 10:52:54 +00:00
util Remove ibm from pulumiverse list 2023-08-10 10:49:06 +01:00
version duplicate version to ensure linking is properly handled 2020-03-19 12:49:34 -07:00
workspace Actually disable plugin acquisition (#14134) 2023-10-14 08:32:43 +00:00
README.md export codegen tests for internal use (#8928) 2022-02-07 12:10:04 +01:00
go.mod [esc] Add commands for managing stack environments 2023-11-13 16:38:31 -08:00
go.sum [esc] Add commands for managing stack environments 2023-11-13 16:38:31 -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.