d1ff268b10
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. |
||
---|---|---|
.. | ||
asset | ||
automation | ||
cmd | ||
dist | ||
dynamic | ||
iterable | ||
log | ||
npm | ||
proto | ||
provider | ||
queryable | ||
runtime | ||
tests | ||
tests_with_mocks | ||
.eslintrc.js | ||
.gitignore | ||
Makefile | ||
README.md | ||
config.ts | ||
errors.ts | ||
index.ts | ||
invoke.ts | ||
metadata.ts | ||
output.ts | ||
package.json | ||
resource.ts | ||
rome.json | ||
stackReference.ts | ||
tsconfig.json | ||
tsutils.ts | ||
utils.ts | ||
version.ts | ||
yarn.lock |
README.md
Pulumi Node.js SDK
The Pulumi Node.js SDK lets you write cloud programs in JavaScript.
Installation
Using npm:
$ npm install --save @pulumi/pulumi
Using yarn:
$ yarn add @pulumi/pulumi
This SDK is meant for use with the Pulumi CLI. Visit Pulumi's Download & Install to install the CLI.
Building and Testing
For anybody who wants to build from source, here is how you do it.
Prerequisites
This SDK uses Node.js and we support any of the Current, Active and Maintenance LTS versions. We support both NPM and Yarn for package management.
At the moment, we only support building on macOS and Linux, where standard GNU tools like make
are available.
Make Targets
To build the SDK, simply run make
from the root directory (where this README
lives, at sdk/nodejs/
from the repo's
root). This will build the code, run tests, and install the package and its supporting artifacts.
At the moment, for local development, we install everything into $HOME/.dev-pulumi
. You will want this on your $PATH
.
The tests will verify that everything works, but feel free to try running pulumi preview
and/or pulumi up
from
the examples/minimal/
directory. Remember to run tsc
first, since pulumi
expects JavaScript, not TypeScript.