Back to Pulumi

V0.15.0

changelog/v0.15.0.md

3.244.05.2 KB
Original Source

0.15.0 (2018-08-13)

Major Changes

Parallelism

Pulumi now performs resource creates and updates in parallel, driven by dependencies in the resource graph. (Parallel deletes are coming in a future release.) If your program has implicit dependencies that Pulumi does not already see as dependencies, it's possible parallel will cause ordering issues. If this happens, you may set the dependsOn on property in the resourceOptions parameter to any resource. By default, Pulumi allows 10 parallel operations, but the -p flag can be used to override this. -p=1 disables parallelism altogether. Parallelism is supported for Node.js and Go programs, and Python support will come in a future release.

First Class Providers

Pulumi now allows creation and configuration of resource providers programmatically. In addition to the default provider instance for each resource, you can also create an explicit version of the provider and configure it explicitly. This can be used to create some resources in a different region from your main deployment, or deploy resources to a programmatically configured Kubernetes cluster, for example. We have a multi-region deployment example for illustrative purposes.

Status Rich Updates

The Pulumi CLI is now able to report more detailed information from individual resources during an update. This is used, for instance, in the Kubernetes provider, to provide incremental progress output for steps that may take a while to comeplete (such as deployment orchestration). We anticipate leveraging this feature in more places over time.

Improved Templating Support

You can now pass a URL to a Git repository to pulumi new to install a custom template, enabling you to share common templates across your team. If you pass a simple name, or omit arguments altogether, pulumi new behaves as before, using the templates hosted by Pulumi.

Native TypeScript support

By default, Pulumi now natively supports TypeScript, so you do not need to run tsc explicitly before deploying. (We often forget to do this too!) Simply run pulumi up, and the program will be recompiled on the fly before running it.

To use this new support, upgrade your @pulumi/pulumi version to 0.15.0, in addition to the CLI. Pulumi prefers JavaScript source to TypeScript source, so if you had been using TypeScript previously, we recommend you make the following changes:

  1. Remove the main and typings directives from package.json, as well as the build script.
  2. Remove the bin folder that contained your previously compiled code.
  3. You may remove the dependency on typescript from your package.json as well, since @pulumi/pulumi has one.

While a tsconfig.json file is no longer required, as Pulumi uses intelligent defaults, other tools like VS Code behave better when it is present, so you'll probably want to keep it.

Closure capturing improvements

We've improved our closure capturing logic, which should allow you to write more idiomatic code in lambda functions that are uploaded to the cloud. Previously, if you wanted to use a module, we required you to write either require('module') or await import('module') inside your lambda function. In addition, if you wanted to use a helper you defined in another file, you had to require that module in your function as well. With these changes, the following code now works:

typescript
import * as axios from "axios";
import * as cloud from "@pulumi/cloud-aws";

const api = new cloud.API("api");
api.get("/", async (req, res) => {
    const statusText = (await axios.default.get("https://www.pulumi.com")).statusText;
    res.write(`GET https://www.pulumi.com/ == ${statusText}`).end();
});

Default value for configuration package

The pulumi.Config object can now be created without an argument. When no argument is supplied, the value of the current project is used. This means that application level code can simply do new pulumi.Confg() without passing any argument. For library authors, you should continue to pass the name of your package as an argument.

Pulumi GitHub App (preview)

The Pulumi GitHub application bridges the gap between GitHub (source code, pull requests) and Pulumi (cloud resources, stack updates). By installing the Pulumi GitHub application into your GitHub organization, and then running Pulumi as part of your CI build process, you can now see the results of stack updates and previews as part of pull requests. This allows you to see the potential impact a change would have on your cloud infrastructure before merging the code.

The Pulumi GitHub application is still in preview as we work to support more CI systems and provide richer output. For information on how to install the GitHub application and configure it with your CI system, please visit our documentation page.

Improvements

  • The CLI no longer emits warnings if it can't detect metadata about your git enlistement (for example, what GitHub project it coresponds to).
  • The CLI now only warns about adding a plaintext configuration in cases where it appears likely you may be storing a secret.