4d3b82cb9f
These changes add support for ESC environments to the Pulumi CLI. This involves two major changes: - Support for the `env` subcommand - Support for the `environment` stanza in stack config files The former reuses the command from `esc` itself with a little rebranding. The latter adds support to stack config files for an `environment` property of the form: ```yaml environment: - list - of - environment - names ``` If this property is present in a stack's config file, the CLI will open the and merge the listed environments during `pulumi up` et. al. If an object-valued `pulumiConfig` property is present in the opened environment, its values will be merged on top of the stack's config prior to whatever operation is to be performed. If an object-valued `environmentVariables` property is present inthe opened environment, its values will be published as environment variables prior to the Pulumi operation. Any values in the open environment's `pulumiConfig` or `environmentVariables` that are marked as secret will be encrypted in the resulting config and will be filtered from the command's logs. |
||
---|---|---|
.. | ||
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.